I'm sorry you are experiencing this.

As soon as I feel like my foot is going to cramp I get up (if I am not already standing) and start my stretching exercises - stepping on the ball of my foot and then pushing my heel back down and then up again and down again. I also stretching out the calf muscles. It doesn't always help but many times it will stop the spasm from spreading right up my leg to my butt - which happens quite often - and locking my leg up.
Rubbing the ball of your foot with your hands - massage like - helps as well.