Night Leg Cramps: What Actually Helps (and What Doesn't)
2026-09-02 · 7 min read
You know the drill: you're half asleep, and suddenly your calf locks up like a fist. Sharp, involuntary, gone in a minute or two - but leaving your muscle sore and you wide awake. Night leg cramps are one of those things everyone's had, almost nobody talks about, and, that's the annoying part, almost everyone has a different folk remedy for. Salt. Magnesium. Bananas. Stretching. "Drink more water." Some of that helps. Some of it is marketing with a vitamin label.
So what does the evidence actually say? Let's walk through what a cramp is, why it happens, what's backed by real research, and when you should actually see a doctor.
What a muscle cramp actually is
A cramp is a sudden, involuntary, painful contraction of a muscle - a muscle that refuses to relax. It usually hits the calf, sometimes the foot or thigh, and it typically lasts anywhere from a few seconds to a few minutes. Afterwards the muscle often stays tender or tight for a while. At its core it's a nervous system event: your muscle gets stuck in a spasm because the signaling between nerves and muscle fibers goes haywire.
It's also astonishingly common. Estimates put the figure at 50 to 60 percent of healthy adults experiencing muscle cramps at some point (StatPearls, NCBI). Nocturnal leg cramps specifically hit about 40 percent of people over 50, and they show up in kids too: around 7 percent of children and teens aged 8 to 18 (StatPearls). For a decent chunk of people it's a regular thing - many who get night leg cramps have them several times a week.
The honest truth about what causes them
Here's where it gets contrarian, and it matters because it changes what you should do.
Most night leg cramps are what doctors call idiopathic - no underlying disease explains them (NICE CKS, "Leg cramps"). They're more a quirk of tired muscles and how we sleep than a sign something's wrong. Common contributing factors include a tight or fatigued calf, a sluggish day with too little movement, not drinking enough, and how you sleep (more on that in a sec).
Now the part that might surprise you. The popular idea that "cramp equals electrolyte or magnesium deficiency" doesn't hold up as well as the supplement marketing would like. Let me be precise, because it's worth knowing.
For exercise-associated cramps - the ones people get during or right after a hard session - the research points more at fatigued muscles and a disrupted conversation between nerves and muscles than at the salt in your sweat. Sports physician Martin Schwellnus, who has studied this for years, has been consistent about this. Studies on runners and even on Ironman triathletes found no consistent electrolyte differences between athletes who cramped and those who didn't (reviews in Sports Medicine; PMC).
And the popular magnesium fix? A Cochrane Review - the gold standard of evidence synthesis - looked at magnesium for muscle cramps and found it's unlikely to provide a clinically meaningful benefit for reducing cramps in older adults. The evidence quality was moderate, and there simply aren't good randomized trials on magnesium for exercise-related cramps (Cochrane CD009402). For pregnancy-related leg cramps the data is genuinely conflicting.
That's not to say magnesium is useless - it's an important mineral and some people genuinely run low. But if you're cramping every night, reach for the stretching and the fluids before you reach for the supplement jar. Don't let the ads write your diagnosis.
What actually helps when a cramp hits
When a cramp is actively happening, there's one thing with real evidence behind it: gentle stretching of the cramped muscle (Grade A recommendation, Sports Medicine evidence review).
For a calf cramp, the classic move is to pull your toes and foot up toward your shin - dorsiflexion - while keeping your knee straight. Do it gently and steadily, not violently. Standing up, planting your foot flat, and leaning forward a little can also do it. You're basically telling the muscle to lengthen against the spasm, which interrupts it.
Pair that with a little warmth or cold to take the edge off the soreness afterwards: a warm shower or towel, or gently massaging the muscle. Breaking the cramp is half the battle; the tenderness that lingers is the other half.
How to actually prevent them
Prevention is the better game, and it's less exotic than the internet would have you believe.
Stretch before bed. The strongest non-drug evidence for night leg cramps lands on calf and hamstring stretching. A Cochrane review found that daily calf and hamstring stretching might reduce the severity of nighttime leg cramps in people 55 and older (the effect on how often they happen is less clear, and the certainty is low). It's cheap, harmless, and at least as defensible as any supplement. A simple runners-style calf stretch, a few rounds, holds of 20 to 30 seconds, in the evening.
Loosen the bed. A sneaky one: tight bed linens at the foot of the bed hold your foot in a pointed, plantar-flexed position, which keeps the calf muscle shortened and more prone to cramping. Give your feet room to point naturally.
Manage your daytime habits. Hydrate through the day instead of flooding at night. Cut back on alcohol and caffeine in the evening, both of which are linked to more night cramps. And if you've had a genuinely strenuous, sweaty session in the heat, that's the one scenario where replacing fluid and electrolytes matters - heavy sweat takes sodium, potassium and magnesium out of you.
Move during the day. Tight, inactive calves cramp more. Regular movement and basic mobility keep the muscle from sitting in a shortened, irritable state.
The one situation where electrolytes genuinely matter
Fairness dictates the flip side. There's a real, historical, well-documented version of "cramp equals salt loss" - it just lives in extreme conditions. In the classic heat-worker studies of the 1920s and 30s, miners and steelworkers who lost enormous amounts of salt through sweat over days cramped far less when they added salt to their water (reported consistently across the Sports Medicine cramp literature). Massive, sustained, hot sweat losses - that's the context where electrolyte replacement is real.
So if you're a heavy sweater doing long, hot sessions - a summer race, a hard heat-wave training block, an hour-plus ride - keeping fluid and minerals topped up is a legitimate lever. An isotonic drink with electrolytes and magnesium, like FitLine Restorate, is a convenient way to refill what heavy sweat takes out, and it's easier on the stomach than one sugary sports bottle after another. That's honest scope: a genuine tool for the sweat-heavy, heat-heavy kind of cramp - not a universal cure that outshines stretching for your 3am calf spasm.
When to see a doctor
Most leg cramps are annoying, not dangerous. But sometimes they're a signal worth acting on. Book an appointment if:
- The cramping leg is also swollen, red, warm or tender - especially on one side, since that can be a blood clot.
- The pain comes with walking and eases when you stop (a classic sign of narrowed leg arteries).
- You have muscle weakness, numbness, or the muscle is wasting.
- The cramps started or got much worse after you began a new medication (statins and diuretics are common culprits).
- You're pregnant, or you have a condition like kidney, liver or thyroid disease.
- The cramps are frequent enough or intense enough to wreck your sleep and simple measures aren't touching them.
Your doctor can rule out the things that look like cramps from the outside - peripheral artery disease, restless legs, nerve issues - and check values like electrolytes, calcium and magnesium if the cause isn't clear. And for the record: quinine, the old standby, does reduce cramps but is no longer recommended by regulators because the toxicity risk is real. There are safer routes.
The bottom line
Night leg cramps are common, usually harmless, and mostly a problem of tired, shortened muscles rather than a vitamin emergency. Deal with one when it happens: stretch the muscle gently. Prevent them over time: stretch calves and hamstrings in the evening, give your feet loose bed linen, hydrate properly through the day, and keep moving. Save the electrolyte talk for hot, heavy, sweaty sessions where it genuinely applies. And if it's frequent, severe, or paired with any warning signs, let a professional take a look - most of the time it'll be nothing, but it's worth being sure.
Photo: Shixart1985, CC BY 2.0
Ready to support your training the smart way?
Shop Fitline