Half an hour before my right leg seizes, before I’m gagging on pickle juice, before I’m limping when I should be pedalling,
I hear my body complain and ignore it.
I’m deep in a mountain running race and my legs are not happy. On a short, steep climb, my right leg suddenly locks up in a muscle cramp that leaves me hobbled. The pain is excruciating. And familiar.
Muscle cramps are common in sports like running and cycling, and I have experienced them many times. To prevent and treat them, I have tried everything from drinking litres of water to gobbling bunches of bananas, swallowing pickle juice to downing salt pills. The diversity of interventions hints at the painful truth. Despite plenty of effort, scientists still don’t know much about muscle cramps.
“By nature, muscle cramps don’t lend themselves to study,” says Kevin Miller, a professor in the Department of Health and Human Performance at Texas State University, who has studied them for 15 years.
They’re unpredictable, for one, and taking samples from a rock-hard, spasming muscle is almost impossible—even if a patient was willing to let a researcher stab them with a needle. Instead, Miller and his colleagues guess that something overexcites the nerves that govern the contraction and relaxation of a muscle, creating a feedback loop. The nerve locks up the muscle, causing pain, which further excites the nerve, spasming the muscle even more.
For decades scientists assumed the culprit was dehydration and a resulting drop in electrolytes. Salts like potassium and sodium are crucial to muscle action and water is the biggest component of blood. But no study showed that improved hydration helped with cramping.
A newer theory suggested muscle fatigue was the main driver of cramps. But just about every marathoner is tired by mile 20, but not all cramp up.
For his Ph.D. Miller dug into the literature and combined with his own novel studies, developed a new theory for the cause of muscle cramps—the spider web.
“As scientists we love to draw boxes,” he says. “We like it when one box leads to the next box, which leads to cramping. But my research shows it’s not linear. It’s more of a spider web of interrelated factors.”
Miller found there are many potential recipes for cramps, and everyone has a unique one. In one study, a researcher interviewed triathletes after a race and found they hadn’t been performing as well as they expected before they got the cramp. “Stress has an often-overlooked effect on the nervous system,” says Miller.
Intensity and duration are likely part of my “recipe.” In training I rarely hit the sustained heart rate of race day for the race distance.
“There’s a lot of research that says that cramping is a protective mechanism,” says Miller. “It’s our body telling us we can’t continue or we risk injury.”
A bad sleep, weather, low blood sugar can all play a role. But cramps can also happen for no obvious reason, which suggests there are missing elements.
Chloride is one possibility, says Michelle Stehman, an assistant professor in the Department of Exercise Physiology at Saint Francis University in Pennsylvania. Scientists know chloride is important for maintaining muscle function, though they don’t know exactly how. “We just know it helps keep muscle contractions happening,” says Stehman.
The direct role of sodium and potassium in muscle function pulled the focus of research, but Stehman is intrigued by historic studies that suggested chloride played a role in labourers who experience cramps. She suggests runners prone to cramping should check the ingredients in their electrolyte drink. Most include sodium and potassium, but not all have chloride.
Otherwise, Stehman and Miller’s best advice for runners, cyclists and any other athlete, is to mimic racing duration and intensity during training, add extra rest before an event, and, unfortunately, accept that suffering is probably inevitable, at least in the short term.
The only way to figure out why cramps happens to me is to reverse engineer them, says Miller. He has developed a post-cramp questionnaire that asks questions about sleep, stress, training, race intensity, nutrition, and, yes, hydration, electrolytes and fatigue.
“When you get a cramp you answer the questions,” he says. “The next cramp, you do it again. You’re looking for patterns…to figure out your individual recipe.”
I’m left with a simple choice: dial back my effort and avoid future cramping or accept the inevitable and try to refine my race preparations. So, I buy a new electrolyte with chloride, add more intensity to my training plan, and mentally prepare myself for the challenges lying somewhere down the trail.
What to do when you get a cramp
Pickle juice, mustard, vinegar: they all work to ease cramping, shortening duration up to 40 per cent over drinking water or doing nothing. But stretching is a better, faster fix, says Miller. “We’ve known for decades that a muscle can’t cramp if it is lengthened,” he explains. Any ingested intervention takes about five minutes to kick in, while gently stretching the angry muscle will work in less than a minute. The catch? Once a muscle has cramped it is much more likely to cramp again.
You may also like: IT Band Exercises for Runners

Read This Story in Our 2025 Running Issue
IMPACT Magazine Running Issue 2025 featuring some incredible Canadian women ultrarunners who are on the rise on the world trail stage. Run your way around the world to earn your six star Abbott World Marathon Majors commemorative medal. Train for 10 km right up to a marathon – plus a 50 km trail run and 70.3 program. Strength workouts for runners, carb load with these pasta recipes and so much more.