Here's a technique I've been using for years to stop painful leg and foot cramps as they start. What you need to do is take your thumb and index finger of one hand and locate the middle point on your upper lip. Take your fingers and place one inside the upper lip and the other on the outside of the lip so that the fingers are opposite each other. Now, squeeze your fingers together HARD. Keep pressing hard for 30 seconds to a minute. The pain will start to disappear in seconds and will be completely gone within a minute.
I've done this to players in the middle of soccer games who have collapsed from the pain of a leg cramp. A minute later they were playing again. So...squeeze away, you'll be glad you did.