Almost every endurance athlete has had one. The calf locks on the run off the bike, the hamstring grabs on a climb, or a foot cramps in the cold water of the swim. The usual advice is to drink more and take more salt. The research says it is not that simple.
Here is what is known about cramps during running and triathlon, what is still argued about, and what athletes can actually try.
Answer first
- Cramps during exercise are usually linked to muscle fatigue, not only dehydration. In a study of Ironman triathletes, the athletes who cramped had raced faster than planned and had a history of cramping. They were not more dehydrated and their blood sodium was similar.
- Salt still matters for some people. Heavy, salty sweaters who lose a lot of sodium over long, hot races may cramp more, and replacing sodium is sensible for them.
- Pacing is the most reliable fix. Starting too hard, or racing harder than you trained, is one of the strongest predictors.
- Stretching the cramping muscle is the quickest way to stop a cramp once it starts.
- No drink or tablet is proven to prevent cramps. Be wary of any product that promises it.
What actually causes exercise cramps?
There are two main theories, and they are not mutually exclusive.
1. The fatigue theory. As a muscle tires, the signals that tell it to contract get stronger and the signals that tell it to relax get weaker. Eventually the muscle contracts and will not let go. This fits a lot of what athletes notice: cramps tend to arrive late in a race, in the muscles doing the most work, and often when you are going harder than usual.
2. The dehydration and electrolyte theory. This is the older idea: you sweat out fluid and sodium, and the muscle misfires. It fits the experience of some athletes, especially in heat, and it is the reason most people reach for salt.
What the research found
A widely cited study by Schwellnus and colleagues (2011) followed 210 Ironman triathletes. The 43 who cramped were no more dehydrated than the others, and their blood sodium changes were similar. What set them apart was that they raced faster than predicted from their training, and many had cramped before.
An earlier Ironman study (Sulzer and colleagues, 2005) also found that triathletes with cramps did not show the large electrolyte changes the old theory would expect.
A 2019 review by Maughan and Shirreffs concluded that cramping probably has more than one cause, and that different athletes may cramp for different reasons. That is why one person swears by salt and another finds it does nothing.
Do salt and electrolytes help with cramps?
For some athletes, likely yes. If you finish long sessions with white salt marks on your kit, you may lose more sodium than most, and replacing it during long or hot events is a reasonable strategy. See how much sodium endurance athletes need and use the free sweat rate calculator to estimate your fluid losses.
What salt is less likely to do is fix cramps caused mainly by fatigue or poor pacing. Taking large amounts of salt without enough fluid can also upset your stomach.
Why pickle juice works so fast
A study by Miller and colleagues (2010) found that a small amount of pickle juice shortened electrically induced cramps compared with water. The interesting part is the timing: it worked far too quickly to have been absorbed into the blood. The likely explanation is a reflex triggered in the mouth and throat that calms the nerve signals to the muscle. It is a useful clue that cramps are at least partly about the nervous system, not only fluid and salt levels.
What about magnesium?
Magnesium is often sold for cramps. A Cochrane review (2020) found it is unlikely to help typical cramps in older adults, and there is little good evidence that it prevents cramps during exercise. Getting enough magnesium from food is still worthwhile for general health.
How to stop a cramp during a race
- Ease off. Drop your pace or cadence straight away. Pushing through usually makes it worse.
- Stretch the cramping muscle gently. For a calf cramp, pull your toes towards your shin. For a hamstring, straighten the leg.
- Hold it for 20 to 30 seconds, then resume slowly.
- Take on fluid and fuel if you have fallen behind, especially in heat.
How to lower your risk next time
- Pace to your training. Race at an intensity you have actually practised. The Ironman data showed racing faster than your training is one of the strongest links to cramps.
- Train specifically. If your race has hills, long climbs or a run off the bike, put those in your training. Muscles that are used to the work are less likely to cramp.
- Fuel properly. Running low on carbohydrate speeds up fatigue. Aim for a planned carb intake per hour on long sessions. See how many carbs per hour for running.
- Replace sodium if you are a salty sweater, especially in long, hot events. Most endurance drinks provide somewhere between 300 and 1,000 mg of sodium per serve. One serve of HYDRAX CORE provides 980 mg alongside 85 g of carbohydrate.
- Taper and sleep well. Arriving at the start line fresh helps.
- Test everything in training, including any salt tablets or drinks you plan to use.
Build an hour-by-hour plan for carbs, fluid and sodium with the free race fuel plan builder.
When to see a doctor
Cramps that happen often at rest, wake you at night regularly, come with swelling, weakness or dark urine, or happen after very little exercise are worth getting checked by a GP or sports physician.
The short version
Most exercise cramps come from muscles that are tired and working harder than they are used to. Salt helps some athletes, especially heavy sweaters in the heat, but pacing, specific training and proper fuelling do more for most people. When a cramp hits, ease off and stretch.
Research referenced
- Schwellnus MP, et al. Increased running speed and previous cramps rather than dehydration or serum sodium changes predict exercise-associated muscle cramping: a prospective cohort study in 210 Ironman triathletes. British Journal of Sports Medicine. 2011. https://pubmed.ncbi.nlm.nih.gov/21148567/
- Sulzer NU, et al. Serum electrolytes in Ironman triathletes with exercise-associated muscle cramping. Medicine and Science in Sports and Exercise. 2005. https://pubmed.ncbi.nlm.nih.gov/16015122/
- Schwellnus MP. Cause of exercise associated muscle cramps (EAMC): altered neuromuscular control, dehydration or electrolyte depletion? British Journal of Sports Medicine. 2009. https://pubmed.ncbi.nlm.nih.gov/18981039/
- Maughan RJ, Shirreffs SM. Muscle Cramping During Exercise: Causes, Solutions, and Questions Remaining. Sports Medicine. 2019. https://pubmed.ncbi.nlm.nih.gov/31696455/
- Miller KC, et al. Reflex inhibition of electrically induced muscle cramps in hypohydrated humans. Medicine and Science in Sports and Exercise. 2010. https://pubmed.ncbi.nlm.nih.gov/19997012/
- Garrison SR, et al. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews. 2020. https://pubmed.ncbi.nlm.nih.gov/32956536/
Important information
This article provides general educational information for healthy adult athletes and is not medical advice. Frequent, severe or unusual cramps should be assessed by a doctor. HYDRAX CORE is a formulated supplementary sports food and is not intended to prevent or treat cramps or any medical condition.
Quick answers
Do electrolytes stop muscle cramps?
Sometimes. Heavy, salty sweaters in long or hot events may cramp less when they replace sodium, but research on Ironman triathletes found most cramps were linked to fatigue and racing faster than usual rather than dehydration or low blood sodium.
What is the fastest way to stop a cramp when running?
Slow down and gently stretch the cramping muscle for 20 to 30 seconds. For a calf cramp, pull your toes towards your shin.
Why does pickle juice help cramps?
In a small study it shortened cramps faster than water, too fast to be absorbed. The likely reason is a reflex from the mouth and throat that calms the nerve signals to the muscle.
Does magnesium prevent cramps during exercise?
There is little good evidence that it does. A Cochrane review found magnesium is unlikely to help typical cramps in older adults.
Why do I cramp on the run in a triathlon?
Tired legs, a hard bike leg and running faster than you trained are common triggers. Pacing the bike, training brick sessions and fuelling properly help most athletes.

