Leg Cramps at Night: Causes, What Actually Helps, and What Doesn't
A calf muscle that suddenly locks in the middle of the night is one of the most painful ways to wake up. Night cramps are very common, especially after 50, and the usual advice — take magnesium, drink more water, eat a banana — mostly isn't backed by evidence. Here is what does help, which medicines can cause cramps, and when a 'cramp' needs a doctor.
By Taha Raza
Published
A cramp is a sudden, involuntary and painful tightening of a muscle, most often the calf, sometimes the foot or thigh. At night it often strikes while lying with the toes pointed. Most night cramps have no serious cause — they become more common with age, inactivity and long periods of standing or sitting — but a few medicines and medical conditions make them more likely.
How do you stop a leg cramp right now?
- Straighten the leg and pull your toes up towards your knee, or stand up and put weight on the cramped leg with the heel down.
- Massage the muscle firmly.
- Walk around for a minute once the worst has passed.
- Warmth afterwards, such as a hot water bottle, can ease the lingering soreness.
How can I prevent leg cramps at night?
Stretch before bed. In a randomised trial published in the Journal of Physiotherapy in 2012, 80 adults over 55 with night cramps either stretched their calves and hamstrings every night just before sleep for six weeks or did no specific stretching. The stretching group had 1.2 fewer cramps per night than the control group and their cramps were less painful (1.3 cm less on a 10 cm pain scale). It costs nothing and takes three minutes.
| Stretch | How | Dose |
|---|---|---|
| Standing calf stretch | Hands on a wall, one leg back, heel down, knee straight; lean forward | 3 × 20 s each leg |
| Bent-knee calf stretch | Same position, bend the back knee to stretch lower in the calf | 3 × 20 s each leg |
| Hamstring stretch | Sit on the edge of the bed, one leg straight, lean forward from the hips | 3 × 20 s each leg |
During the day, regular walking and calf raises keep the muscles conditioned. At night, a pillow under the feet or loose bedclothes that don't push the toes downwards can help. If you train, cool down properly after hard leg sessions.
Does magnesium help leg cramps?
Probably not for most people. A 2020 Cochrane review of 11 trials concluded that magnesium supplements are unlikely to provide meaningful cramp prevention for older adults with ordinary leg cramps; evidence in other groups was conflicting or missing. Our magnesium guide explains who might benefit from magnesium for other reasons. Bananas for potassium are a popular remedy with no trial evidence for cramps.
What about quinine?
Quinine does reduce cramps a little: a 2015 Cochrane review of 23 trials found it cut cramp numbers by 28 percent, intensity by 10 percent and cramp days by 20 percent over two weeks compared with placebo. But it can cause rare, serious side effects, including dangerous blood disorders and heart rhythm problems, so regulators such as the US FDA advise against using it routinely for leg cramps. Do not take quinine without a doctor's advice, and never in larger doses than prescribed.
Can medicines cause leg cramps?
Yes. A 2012 study of prescription data for 4.2 million people in British Columbia, Canada, looked at whether cramp treatment started more often after people aged 50 and over began certain drugs. It did: 2.4 times more often after inhaled long-acting beta-agonists for asthma or COPD, 2.1 times after potassium-sparing diuretics and 1.5 times after thiazide-type diuretics ('water tablets' for blood pressure); the link with statins was small. If cramps started after a new medicine, tell your doctor — do not stop it on your own.
Why do muscles cramp during exercise?
Mostly from fatigue and intensity, not dehydration. A study of 210 Ironman triathletes found no differences in body-weight change or blood salt levels between those who cramped and those who didn't; the risk factors were racing faster and a history of cramps. Still, in Pakistani heat, drinking and replacing salt during long sessions is sensible — see our hydration guide. Pickle brine has an interesting effect: in a 2010 study, about 75 ml of pickle juice ended electrically induced cramps 49 seconds faster than water (85 vs 134 seconds), too quickly to be from salt absorption, which suggests a reflex triggered in the mouth and throat.
When are leg cramps a sign of something serious?
- A calf that stays swollen, red, warm or tender after the cramp — this can be a blood clot (DVT); seek urgent care.
- Cramps with muscle weakness, wasting, twitching or numbness.
- Cramps that are frequent and severe, or spreading to many muscles, including the hands.
- Cramps with symptoms of diabetes, thyroid problems, kidney or liver disease.
- Leg pain that comes on with walking and eases with rest — this can be poor circulation, not cramp.
This article is general information, not medical advice. See a doctor about cramps that are frequent, severe or disturb your sleep, and seek urgent care for a swollen, red or warm calf.
Frequently Asked Questions
What is the best way to stop leg cramps at night?
Stretch your calves and hamstrings every night before bed. In a 2012 trial of adults over 55, this cut cramps by 1.2 per night and made them less painful after six weeks.
Does magnesium help night leg cramps?
Probably not for most people. A 2020 Cochrane review concluded magnesium is unlikely to give meaningful cramp prevention for older adults with ordinary leg cramps.
Can medicines cause leg cramps?
Yes. Cramp treatment was 2.4 times more likely after starting long-acting asthma or COPD inhalers and 1.5–2.1 times after some diuretics in a study of 4.2 million people. Talk to your doctor rather than stopping a medicine yourself.
Are leg cramps caused by dehydration?
Not usually. In 210 Ironman triathletes, cramps were linked to racing faster and previous cramps, not to dehydration or blood salt levels. Night cramps are more linked to age and muscle conditioning.
When should I worry about leg cramps?
See a doctor if the calf stays swollen, red or warm (possible blood clot), or if cramps come with weakness, numbness or wasting, or are frequent and severe.
Sources
- Hallegraeff JM et al. Stretching before sleep reduces the frequency and severity of nocturnal leg cramps in older adults: a randomised trial. Journal of Physiotherapy, 2012
- Garrison SR et al. Magnesium for skeletal muscle cramps. Cochrane Database of Systematic Reviews, 2020
- El-Tawil S et al. Quinine for muscle cramps. Cochrane Database of Systematic Reviews, 2015
- Garrison SR et al. Nocturnal leg cramps and prescription use that precedes them: a sequence symmetry analysis. Archives of Internal Medicine, 2012
- 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
- Miller KC et al. Reflex inhibition of electrically induced muscle cramps in hypohydrated humans. Medicine & Science in Sports & Exercise, 2010
More guides
- Melatonin for Sleep: Does It Work, How Much to Take, and Is It Safe?Melatonin is one of the most popular sleep aids in the world, sold as tablets, gummies and sprays. It is a real hormone and it does something — but for ordinary insomnia the effect is small, and what is in the bottle may not match the label. Here is what melatonin is good for, how to take it, and the safety issues worth knowing.
- Gut Health, Probiotics and Dahi: What Actually Helps Your Gut MicrobiomeGut health is everywhere — probiotic capsules, kombucha, 'gut reset' cleanses. Pakistani kitchens have quietly done some of this for centuries with dahi, lassi and kanji. Here is what the research says about the microbiome, when probiotic supplements help and when they don't, and the simple food habits with the best evidence.
- Sauna, Ice Baths and Cold Showers: What the Evidence Says About Heat and ColdSaunas, steam rooms, ice baths and cold showers are everywhere on fitness social media, sold as recovery, fat loss, immunity and longevity in one. The research supports some of it, contradicts some of it, and adds an important warning for people who lift weights. Here is what heat and cold actually do, and how to use them safely.
