Leg cramps at night are sudden, painful tightenings of the calf or foot muscles that wake you up. They become more common with age, especially in women, and can wreck a night’s sleep. The quickest fix during a cramp is to stretch the muscle. For prevention, the evidence is weaker than the internet suggests: magnesium is unlikely to help most people, and even regular stretching has mixed results. Here is what we know.
Key takeaways
- Night leg cramps usually affect the calf or small foot muscles and are more common in later life and in women.
- To stop a cramp: pull your toes up towards your shin, or stand and put weight on the leg.
- A Cochrane review found magnesium is unlikely to reduce cramps in older adults (moderate-certainty evidence).
- Calf stretching before bed may make little difference for people over 60, but it is safe and some people find it helps.
- Quinine works but is no longer recommended because of serious side effects.
What causes leg cramps at night?
Most night cramps have no single clear cause; doctors call them idiopathic. Muscles that are tired, short and inactive (feet pointed down under the bedsheets) seem prone to misfiring. Common contributing factors include:
| Factor | Why it may matter |
|---|---|
| Age | Cramps become more frequent and severe in later life |
| Muscle fatigue | Long days standing or hard training |
| Sitting or lying with feet pointed | Keeps the calf in a shortened position |
| Some medicines | For example certain diuretics and other drugs; ask your doctor |
| Medical conditions | Diabetes, nerve, kidney, thyroid or circulation problems, and pregnancy |
How to stop a leg cramp fast
- Stretch the muscle: straighten your leg and pull your toes up towards your shin, or grab your foot and pull gently.
- Stand up: put weight on the cramping leg and press your heel into the floor.
- Massage and warmth: rub the muscle, then use a warm towel or shower once the cramp eases.
- Walk it off: a minute of walking often stops it returning straight away.
How to prevent leg cramps at night
What the evidence says
A 2020 Cochrane review of magnesium concluded, with moderate certainty, that magnesium is unlikely to reduce how often or how badly older adults get muscle cramps, and side effects such as diarrhoea were common. A separate meta-analysis also found magnesium did not appear effective for night cramps in the general population, though it may have a small effect in pregnancy.
Stretching is the classic advice, but a 2021 Cochrane review found that 12 weeks of calf stretching may make little or no difference to night cramps in people aged 60 and older, and the overall evidence is very uncertain. Quinine does reduce cramps, but it is no longer recommended because of the risk of serious side effects.
Practical steps worth trying
- Stretch your calves before bed for 30 seconds on each side. It is safe and costs nothing, even if the proof is weak.
- Keep sheets loose at the foot of the bed so your toes are not pushed into a pointed position.
- Stay active and build leg strength gradually, especially if cramps follow unusual effort.
- Drink normally during the day and especially after sweaty exercise; see our guide to hydration and electrolytes.
- Review your medicines with your doctor or pharmacist if cramps began after starting a new one.
Good sleep helps you cope; our sleep guide for 35+ covers the basics. If you were thinking of magnesium for sleep instead, read magnesium for sleep and recovery.
Leg cramps vs restless legs
Cramps are painful, hard knots in a muscle that last seconds to minutes. Restless legs syndrome is an uncomfortable urge to move your legs, usually without a hard knot, eased by moving. They need different treatment, so describe your symptoms clearly to your doctor.
Safety note: See a doctor if cramps are frequent and severe, if you have leg swelling, redness or warmth (which can signal a blood clot), muscle weakness or wasting, numbness, or cramps that started with a new medicine. Do not take quinine for cramps without medical advice.
FAQ
Does magnesium help night leg cramps?
For most adults, probably not. A Cochrane review found magnesium is unlikely to reduce cramps in older adults, though it may help slightly in pregnancy.
What deficiency causes leg cramps at night?
Most night cramps are not caused by a deficiency. Low blood minerals can cause cramps in some medical situations, which a blood test can check.
Why do I get leg cramps every night?
Frequent cramps are more common with age, long days on your feet and some medicines or conditions. If they happen most nights, see a doctor to rule out a cause.
Do bananas help leg cramps?
There is no good evidence that bananas or extra potassium prevent night cramps in healthy people.
Sources
- Cochrane. Magnesium for muscle cramps. 2020.
- Cochrane. Non-drug treatments for lower limb muscle cramps. 2021.
- Effect of magnesium therapy on nocturnal leg cramps: systematic review and meta-analysis. Fam Pract, 2014.
- American Family Physician. Treatments for nocturnal leg cramps. 2017.
- Nocturnal leg cramps in older people: review. Age and Ageing, 2016.
This article is for general education and is not medical advice. Check with your doctor before starting a new training or nutrition plan, especially if you have a health condition.