Photo by Alex Kinkate on Pexels
You’re a few kilometres into your long run, or maybe it’s mile 18 of a marathon, when it hits — a sharp, seizing tightness in your calf or hamstring that stops you dead. Muscle cramps are one of the most common complaints in running, and also one of the most misunderstood. People reach for a banana or swear by their electrolyte drink, often without really knowing whether any of it helps.
The honest answer is that sports science still doesn’t have a complete picture of why cramps happen. But we know enough to give you practical, evidence-based steps that actually reduce them — rather than just throwing magnesium at the problem and hoping for the best.
This article covers the main causes of muscle cramps when running, what the research actually supports, and what you can do before, during and after a run to give yourself the best chance of staying cramp-free.
What actually causes muscle cramps when running?
There are two main theories, and they’re not mutually exclusive.
The dehydration and electrolyte theory has been around for decades. The idea is that when you sweat, you lose sodium, potassium, magnesium and other electrolytes. Without these, your muscles can’t contract and relax properly, leading to cramps. This makes intuitive sense, and it’s why electrolyte drinks became standard race advice.
The neuromuscular fatigue theory is newer and increasingly well-supported. Research from sports scientists including Martin Schwellnus at the University of Pretoria suggests that cramps are primarily caused by altered neuromuscular control in a fatigued muscle — essentially, the signalling between your nervous system and your muscle gets disrupted when you push harder or longer than you’re trained for.
In practice, it’s probably both. Dehydration and electrolyte imbalance may worsen neuromuscular fatigue. But the research is reasonably clear that most exercise-associated cramps aren’t caused by low sodium or magnesium alone. Fit, well-hydrated runners cramp too. And cramping in the same muscle, at the same point in a race, suggests a training issue rather than a nutrition one.
The most common triggers (and which one is probably yours)
| Trigger | Typical pattern | Who it affects most |
|---|---|---|
| Muscle fatigue | Cramps late in a run or race | Runners who went out too fast or under-trained |
| Dehydration | More likely in heat, high sweat rate | Runners in warm conditions, long runs without fluids |
| Electrolyte loss (especially sodium) | Long runs 90+ minutes | Salty sweaters, hot weather runners |
| Inadequate warm-up | Cramps early in the run | Runners who skip warm-up or start too fast |
| Muscle tightness/imbalance | Recurring cramps in same spot | Runners with limited mobility or muscle weakness |
| Sudden training increase | Cramps in new-to-running muscles | Beginners ramping up volume quickly |
If you’re cramping consistently at the 10K mark of a half marathon, that’s a fatigue and pacing issue. If you only cramp in hot races after 90 minutes, electrolytes are worth investigating. Pattern recognition matters here.
During a run: what to do when a cramp hits
Stop trying to run through it — that rarely works and can make it worse. Here’s what actually helps:
Slow down or stop. Walk for 60–90 seconds. Forcing a contracted muscle to keep working under load prolongs the cramp.
Stretch the muscle gently. For a calf cramp: stand, step forward with your unaffected leg, and press your cramping heel into the ground with a straight knee. Hold for 20–30 seconds. Don’t aggressively pull or bounce — you’re trying to trigger the Golgi tendon organ (a reflex that tells the muscle to relax), not tear anything.
For hamstring cramps: sit or lie down if you can. Straighten your leg and flex your foot toward you. Hold for 20–30 seconds.
Apply light pressure or massage. Using your hands or a thumb to press firmly into the cramping muscle for 10–15 seconds can help break the cycle.
If you have fluid: drink it. Even if dehydration isn’t the root cause, fluids help and won’t hurt.
One thing that has good anecdotal evidence but limited research behind it: pickle juice. Some runners swear by it — small amounts (about 60–70ml) seem to work within 30–90 seconds, faster than hydration could explain. The theory is that the acidity triggers a neural reflex rather than replacing electrolytes. Worth knowing if you’re prone to cramps in races, though it’s not for everyone.
Before you run: prevention that actually works
1. Don’t increase your mileage too fast
This is the most consistent predictor of cramping. If you jump from running 30km a week to 50km without building the base, your muscles fatigue faster and cramp more. The 10% rule (adding no more than 10% to weekly volume each week) is a rough guideline — not gospel, but a useful starting point. If you’re following a structured plan like a 16-week marathon training plan, progression is built in for exactly this reason.
2. Warm up properly
Starting a run with cold, tight muscles is asking for trouble. A 5–10 minute dynamic warm-up — leg swings, hip circles, walking lunges, some easy jogging — gets blood into the muscles before you ask them to work. This is especially important in cold weather and for runners over 40.
3. Pace yourself properly in races
Most runners who cramp in a 10K or half marathon went out too fast. If you know you tend to cramp at mile 9 of a half, there’s a strong argument that you’re running the first 8 miles too hard. Negative splitting — running the second half slightly faster than the first — dramatically reduces late-race muscle fatigue.
4. Address muscle imbalances
Chronic cramps in the same spot often point to a weak or overloaded muscle. Weak calves, tight hip flexors, or poor glute activation can cause compensatory overload in specific muscles. Single-leg calf raises, glute bridges and hip flexor stretches done 3x per week can make a genuine difference over 6–8 weeks.
Hydration and electrolytes: what’s worth doing
Hydration matters — especially for runs over 60 minutes in warm conditions. But most runners don’t need to obsess over electrolytes for a 5K or a short training run. Here’s a practical framework:
- Under 60 minutes: water is fine for most people. You don’t need electrolytes.
- 60–90 minutes: start with water, consider an electrolyte drink or tab if it’s warm or you’re a heavy sweater.
- Over 90 minutes: take on sodium-containing fluid roughly every 20 minutes. A sports drink or electrolyte tab in water works. Aim for 400–800ml per hour depending on sweat rate and conditions.
Sodium is the electrolyte most consistently associated with cramping. Magnesium is frequently marketed, and while deficiency can cause muscle issues, most people eating a reasonable diet aren’t magnesium-deficient. Supplementing magnesium has mixed evidence for cramp prevention in runners specifically.
You can check guidance on hydration from the NHS as a baseline, though sports-specific needs vary based on conditions and individual sweat rates.
Recovery: what to do after cramps
After a particularly cramp-heavy run or race, your muscles will likely feel sore and tight for 24–48 hours — this is normal. Here’s what helps:
Light movement. Don’t just sit still. An easy 20-minute walk the next day promotes blood flow and speeds recovery more than total rest.
Stretching and foam rolling. Gentle static stretching and foam rolling of the affected muscle for 5–10 minutes can reduce residual tightness. Don’t go painfully deep — you’re not trying to undo anything, just promote circulation.
Rehydrate and eat. If you were significantly depleted, prioritise fluids and a carb-and-protein-containing meal within 60–90 minutes of finishing.
Don’t just dismiss it. If you’re cramping regularly in training, it’s telling you something: too much volume, not enough recovery, a pacing problem, or a mobility issue that needs addressing. Cramps in the same muscle at the same point in every run are a pattern worth fixing before race day.
When cramps might need medical attention
Occasional muscle cramps during hard or long runs are normal. But if you’re experiencing cramps at rest, cramps in multiple muscle groups simultaneously, cramps that last more than 10 minutes and don’t respond to stretching, or cramps accompanied by significant weakness — it’s worth speaking to a GP. Conditions including peripheral artery disease, nerve compression, thyroid issues and certain medications can all cause cramp-like symptoms that have nothing to do with running.
If you’re following a heavy training block and cramps are getting worse rather than better with rest, that can also be a sign of overtraining — worth paying attention to.
The Honest Takeaway
- Fatigue is usually the main culprit. If you’re cramping late in runs or races, you’ve either gone too fast, done too much too soon, or both. Fix your pacing and build your mileage gradually before blaming electrolytes.
- Warm up before every run. It takes 8 minutes. Cold muscles cramp more. That’s the deal.
- Electrolytes matter for long efforts in the heat — but sodium is the one to prioritise, not magnesium tablets. For most training runs under an hour, water is enough.
- Recurring cramps in the same spot are a signal. Address the underlying muscle weakness or tightness rather than just managing the cramp each time it appears.
- If a cramp hits mid-run: stop, stretch gently, walk for a minute. Don’t grit your teeth and push through — it almost always makes things worse.
Next read: How to avoid side stitches when running