By Marilynn Preston

Class is in session. Today’s topic isn’t the sexiest, but if you’ve ever had a muscle cramp during sex, you know how it can snap the brain to complete attention. Cramps happen at other times, too.

You’re running across a tennis court when suddenly, someone is jabbing a fork into your calf. Or you’re blissfully swimming along and for no reason, your toes get stuck in a vise. Or you’re asleep in bed hours after a vigorous walk – nighttime cramps are very common – and you’re jolted awake with a piercing pain in your thigh.

So much for the problem. Let’s talk solutions. Though it’s still a bit of a mystery why some people get cramps – aka charley horses or muscle spasms – there are lots of things you can do for prevention and relief.

Let’s begin with a little basic physiology.

CRAMPS R US
Every movement you make involves the contraction and relaxation of a muscle. When your muscle contracts (gets shorter), there is a change in the concentration of sodium and potassium ions (minerals called electrolytes) inside the muscle. When your muscle relaxes, the concentration of sodium and potassium goes back to normal. At least, that’s the cosmic plan.

But if you work your muscles too hard or too long (overexertion) or if you don’t drink enough fluids (dehydration), you may cause the ionic concentration to get so out of balance that your muscle contracts – and stays contracted.

The result? A cramp! Sometimes, the muscle will cramp right away, while other times, it has a delayed reaction and cramps up later at night. It might last a minute or less, or it may really take hold and hang on, so much so that you actually feel muscle soreness the next day.

OTHER CAUSES
High heels, a sedentary lifestyle and circulation problems can bring on cramps, and so might certain medications (statin drugs, for instance). A change in terrain that puts more strain on your muscles – climbing hills versus walking the flats – can also cause leg cramps.

So exercise your curiosity: What might be causing your cramps? Figure it out; the solution is often simple. In some cases – when reoccurring cramps are accompanied by swelling or muscle weakness – the problem could involve a malfunctioning vascular system – and for that, you’ll have to consult a doctor.

SELF-MASSAGE WORKS
There’s a good chance you can relieve your cramp by calmly, gently massaging and stretching the cramping muscle. This is hard to manage when you’re writhing in pain, so try a few deep-relaxing breaths at the first sign of trouble.

Let’s say it’s your calf that’s cramping. While you’re massaging the stricken area, flex your foot so your toes are pointing back toward your knees. (This contracts the muscle in front of your shin and relaxes your calf.)

WARM UP
Warming up your muscles before you work out and stretching afterward can help prevent cramping. But do it like you mean it, with a focus on relieving muscle tension and fatigue and keeping your body fluids flowing to flush away waste products. If you’re plagued by night cramps, try some gentle stretching before you go to bed.

SLEEP IN SOCKS
Sleeping with socks on has helped me, and it might help you. Don’t go to sleep with your toes pointed. And though this is tough to monitor when you’re in dreamland, it helps to sleep on your side. Also, sleeping with tight blankets or sheets can bend your toes down and trigger cramps.

STAY HYDRATED
This is a biggie. To avoid dehydration and cramping, drink, drink, drink enough fluids to keep your urine clear. A glass of water before bedtime can help, too.

GET YOUR MINERALS
Sometimes, cramps happen because you’re lacking minerals. A small can of tomato juice gives you a quick jolt of potassium, and so do bananas. Magnesium and calcium supplements can also help. Personally, I get good results from a magnesium product called Calm.

As always, no single remedy works for everyone. You have to experiment and see what works for you. This is true for everything in life.

– Marilynn Preston is the author of “Energy Express,” America’s longest-running healthy lifestyle column. For more on personal well-being, visit www.MarilynnPreston.com.