You're halfway up a long climb, you've been in the saddle for hours and suddenly your calf or quad locks up like a stone. Cramp is one of the most talked-about things in any group ride, and the explanation is nearly always the same: "you're low on salts". The science is a lot more nuanced. Here's what is known, what to do in the moment, what makes sense for prevention and when not to shrug it off.
What an exercise-associated cramp is
Researchers call it exercise-associated muscle cramp: an involuntary, painful and short-lived contraction of a muscle that appears during or shortly after exercise in healthy people. According to the review by Miller and colleagues (2010), it usually affects a single large muscle that crosses two joints (calf, quads, hamstrings), especially when that muscle contracts while already shortened. They also describe a window of up to about 8 hours after exercise when it is easier for cramps to come back.
It is common: in a survey quoted in that same review, 1,631 of 2,438 triathletes (67%) said they had had them. And although it hurts a lot, in the vast majority of cases it passes within minutes.
What the evidence says: two theories
The salt and dehydration theory
This is the classic explanation: you sweat, lose water and sodium, and that upsets the nerves and triggers the cramp. It is based on old observations (miners and workers in very hot settings) and on isolated cases of athletes who sweated a lot.
The problem is that, when it has been measured, it doesn't hold up as a general cause. Martin Schwellnus reviewed the evidence in 2009 and concluded that support for the salt and dehydration theory comes mostly from anecdotes, case series (18 cases in total) and one small study, while four prospective studies do not support it. Two examples from his team:
- Among 72 runners in a road ultra, those who cramped were no more dehydrated and had no clinically relevant electrolyte changes compared with those who didn't (Schwellnus et al., 2004).
- Among 210 Ironman triathletes, 43 cramped. There were no differences in electrolytes or weight loss. What did predict cramping was going faster than expected (including on the bike leg) and having cramped in previous races (Schwellnus et al., 2011).
Lab work points the same way: losing almost 5% of body weight through sweat did not change how easily a cramp could be triggered when fatigue and intensity were controlled (Braulick et al., 2013).
The neuromuscular (fatigue) theory
The explanation with the most support today is that cramp comes from a mismatch in the nervous control of a fatigued muscle. With fatigue, the signals that excite the muscle gain weight and the ones that brake it lose it; the spinal cord ends up sending contraction orders the muscle can't "switch off" (Miller et al., 2010; Schwellnus, 2009).
It fits what you see on the bike: cramps arrive late, when the muscle has done a lot of work, during harder-than-usual efforts or after a start that was too lively. In a 56 km ultra, the runners who cramped had gone faster in the first half and all of them had a history of cramping (Schwellnus et al., 2011b). It also explains why stretching stops a cramp almost at once: stretching activates tendon receptors that inhibit the contraction, and it does nothing to your salts or hydration.
So salts don't matter at all?
Not quite. Maughan and Shirreffs (2019) think there is probably more than one type of cramp: some linked to fatigue and others where water and salt balance does play a part, especially with very heavy sweating and heat. Bergeron (2007) describes that second type, "exertional heat cramps", which start with tiny, barely noticeable twitches and can turn into disabling cramps within 20-30 minutes.
Some data point that way, though with few participants:
- Drinking a carbohydrate-electrolyte drink with added salt at the rate of sweat loss delayed cramp onset, but 9 of 13 participants still cramped (Jung et al., 2005).
- After sweating in the heat, drinking plain water made the muscle somewhat more cramp-prone in the lab, and an oral rehydration solution with electrolytes prevented that (Lau et al., 2019 and 2021, about 10 participants per study).
The conclusion of the most recent review (Miller et al., 2022, with Schwellnus as co-author) is that cramps come from a combination of factors rather than a single cause, and that prevention works better when tailored to each person than with generic advice such as "drink more".
What to do when you cramp on the bike
- Ease off straight away. Back off, shift to an easier gear and spin gently. If the cramp locks you up, stop somewhere safe and get off.
- Gently stretch the affected muscle and hold until it lets go. It's the treatment with the most support (Miller et al., 2010 and 2022). For the calf, for example, foot planted and heel down; no bouncing or yanking.
- Give it a few minutes. Once it eases, ride on at a comfortable pace. It can easily come back for a while, so don't attack the next ramp flat out.
- Eat and drink according to your plan, especially if it's hot and you've been sweating for hours: a drink with electrolytes rather than plain water. It isn't the cure for the cramp, but it's what a long ride needs anyway.
- Think about why it happened: did you start too hard? More climbing than you train for? Too little food? Extreme heat? Adjust the rest of the stage.
About quick fixes: pickle juice shortened lab-induced cramps (about 85 s versus 134 s with water), but without changing blood salts, so if it works it seems to be through a reflex from the mouth (Miller et al., 2010b). Something similar was seen with spicy "TRP agonist" drinks (Craighead et al., 2017). These are small lab studies: treat them as a curiosity, not a solution.
Sensible prevention
There's no magic formula. What makes most sense with the evidence available:
- Pace yourself. Going faster than planned is one of the clearest risk factors. In an ultra, starting easy is the best "anti-cramp pill".
- Train for what you'll do. Long rides and climbing similar to your route. If the muscle arrives less fatigued, the odds drop.
- If you're prone to cramps, factor it in. Having cramped before is the other big predictor. Look at when it happens (at what point, at what pace, in what weather) and adjust.
- Eat and drink sensibly, following the general carbohydrate and fluid guidelines (we have a separate guide on what to eat on the bike). In heat with heavy sweating, an electrolyte drink rather than plain water. But don't overdo the drinking: too much fluid is a problem too (Hew-Butler et al., 2015).
- Use gears that let you climb without grinding. Grinding forces you to push harder, and high intensity is a risk factor.
- Test everything first. Drinks, salts or food: in training, never on the day of the ride.
What has no support: stretching right before the ride to "prevent" cramps (in one study it didn't change cramp susceptibility; Miller et al., 2018) and magnesium supplements (the 2020 Cochrane review found no trials in athletes and, in older people with night cramps, it didn't help).
Common myths
| What people say | What the evidence says |
|---|---|
| "Cramps are always low salts." | In field studies, people who cramp don't usually have lower sodium or more dehydration. Fatigue and pace matter more; salts may play a part in some cases with heavy heat and sweat. |
| "Drink some water and it'll pass." | Water takes time to absorb and doesn't stop a cramp. After heavy sweating, plain water may even make cramps more likely; an electrolyte drink is better. |
| "Eat a banana." | Eating bananas after cycling in the heat raised blood potassium only slightly and slowly, within normal range (Miller, 2012). Good ride food, not an instant remedy. |
| "Take magnesium to prevent them." | There are no trials in exercise cramps; in older people with night cramps it didn't help and can upset the gut (Cochrane, 2020). |
| "Stretch before you ride and you won't cramp." | One study found pre-stretching didn't change cramp susceptibility. Stretching is for stopping a cramp once it has started. |
| "Pickle juice works because of the salt." | If it helps, it isn't the salt: it acts before anything changes in the blood. A nerve reflex is suspected. |
When it may be something more serious
A cramp that eases with stretching and doesn't come back is rarely a worry. But not every muscle pain on a ride is "just a cramp". The point isn't to diagnose yourself on a mountainside, but to recognise signs that mean stop and get help:
- Cramps that won't ease with stretching, are very severe, last a long time or keep coming back: MedlinePlus advises seeing a health professional in those cases.
- Intense muscle pain with very dark urine (reddish or cola-coloured), weakness or little urine: it can point to muscle breakdown (rhabdomyolysis), which needs medical care.
- Cramps together with confusion, headache, nausea or vomiting: these symptoms appear, for example, with low blood sodium or with heat illness. If it's very hot and there is confusion, odd behaviour or very high body temperature, call 112.
- Chest pain, shortness of breath or fainting: stop and call 112 without waiting.
Also, in a study of 15,778 runners, a history of cramping was associated with chronic disease and taking medication (Schwellnus et al., 2018). If you cramp often, take medication or have a health condition, talk to your doctor before a long ride.
Before you go
- A realistic pacing plan: the first kilometres easier than your body asks for.
- You have trained distances and climbing similar to the route.
- A tested food and drink plan, with electrolytes if it'll be hot.
- Gears easy enough for the long climbs.
- You know how to stretch calves, quads and hamstrings without leaping off the bike.
- If you cramp often, take medication or have a health condition: check first.
- Phone charged and 112 clear in your mind for any warning sign.
This guide is for general information and summarises published evidence; it does not replace advice from a doctor or health professional. If something isn't right, stop and get help: 112 (in Spain and across the EU).