Mild severity65% reported by patientsICD-10: R25.2
Summary
Sudden, involuntary muscle contractions in the leg — most often in the calf — that cause intense pain lasting seconds to minutes.
What is it?
Leg cramps are sudden, painful, involuntary contractions of a muscle or muscle group — most commonly the calf (gastrocnemius). They affect up to 60% of adults and are particularly common at night (nocturnal leg cramps), disrupting sleep. Most are idiopathic (no clear cause) or related to dehydration, electrolyte imbalance, and prolonged sitting or standing. Secondary causes include medications (diuretics, statins), peripheral artery disease, and nerve compression. Distinguishing nocturnal leg cramps from restless leg syndrome (RLS) is important — RLS causes an urge to move rather than a painful contraction.
Common causes
Lifestyle / Physiological
Dehydration
Prolonged standing or sitting
Exercise (especially in heat)
Pregnancy
Electrolyte Imbalance
Low magnesium
Low potassium
Low calcium
Low sodium
Medications
Diuretics (deplete electrolytes)
Statins
Beta-agonists
Raloxifene
Donepezil
Medical Conditions
Peripheral artery disease
Lumbar spinal stenosis
Diabetes
Liver cirrhosis
Hypothyroidism
When to see a doctor
1Frequent or severe cramps disrupting sleep every night
2Cramps accompanied by significant leg swelling, redness, or skin changes
3Leg pain and cramping that occurs with walking and resolves with rest (claudication — possible arterial disease)
4Cramps with progressive muscle weakness
5Cramps in someone taking diuretics or statins — electrolyte or drug-related
6Cramps in pregnancy — rule out DVT if leg is also swollen
What you can do
✓Stretch the calf before bed: stand and lean against a wall with the back knee straight
✓Stay well hydrated throughout the day, especially during exercise
✓Ensure adequate magnesium through diet (nuts, seeds, leafy greens) or supplements
✓During a cramp: stand on the affected leg, flex the foot upward, and walk it off
✓Warm the muscle after a cramp with a heating pad to reduce residual soreness
✓Reduce caffeine and alcohol, which promote dehydration and electrolyte imbalance
This page is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult your doctor or a qualified health provider with questions about your symptoms or medical conditions.
Have a question about leg cramps?
Ask MedMind AI about causes, medications, or next steps.