HealthMarked

Leg Cramps at Night: Why They Happen and How to Stop Them

Sudden, intense muscle cramps that wake you from sleep β€” usually in the calf β€” affect up to 60% of adults at some point. They're usually harmless but intensely painful. Here's what causes them and how to prevent them.

SM

Medically reviewed by Dr. Sarah Mitchell, MD β€” Medical Director & Chief Editor

Board-certified Internal Medicine Β· MD Johns Hopkins

Published Β· Reviewed

What Are Nocturnal Leg Cramps?

Nocturnal leg cramps are sudden, involuntary, painful contractions of a muscle β€” most commonly the calf (gastrocnemius), though the foot or thigh can also be affected. They occur during rest or sleep, last from a few seconds to several minutes, and leave the muscle sore for hours afterward. Prevalence rises steeply with age: about 50–60% of adults over 50 experience them regularly, and they are the third most common musculoskeletal complaint in older adults after lower back pain and knee pain.

What Causes Them?

The exact mechanism is not fully understood, but several contributing factors have been identified:

Muscle Fatigue and Overuse

Prolonged standing, unaccustomed exercise, or sitting in positions that shorten the calf (cross-legged, with toes pointed) can prime muscles for cramping during rest. Athletes after intense training are particularly susceptible.

Dehydration and Electrolyte Imbalance

Low fluid volume and electrolyte disturbances β€” particularly low magnesium, potassium, and sodium β€” alter the electrical properties of muscle membranes and reduce the threshold for spontaneous contraction. Sweating heavily (athletes, hot climates) or diarrhoea/vomiting can precipitate cramps.

Medications

Several commonly prescribed drugs are associated with nocturnal leg cramps:

  • Diuretics (furosemide, thiazides) β€” deplete magnesium and potassium
  • Statins (rosuvastatin, atorvastatin) β€” myopathy-related cramps in a subset of patients
  • Beta-agonists (salbutamol) β€” used for asthma
  • Calcium channel blockers (nifedipine)
  • Long-term oral contraceptives
  • Antipsychotics and antidepressants

Neurological Causes

Peripheral neuropathy (from diabetes, alcohol, or B12 deficiency) disrupts the lower motor neuron signals that regulate muscle tone, predisposing to cramping. Spinal stenosis causing lumbar nerve root compression is another structural cause β€” often accompanied by leg weakness or pain on walking (neurogenic claudication).

Medical Conditions

Conditions associated with higher rates of nocturnal leg cramps include: hypothyroidism, kidney disease (particularly in dialysis patients), liver cirrhosis, and peripheral artery disease.

Immediate Relief When a Cramp Strikes

  • Stand up and put weight on the affected leg β€” the stretch signal inhibits the cramp
  • Stretch the calf: straighten the knee and pull the toes toward your shin (dorsiflexion)
  • Massage the muscle firmly
  • Apply heat (warm towel, heating pad) to relax the muscle

Prevention

  • Stretch before bed: 3 Γ— 30-second calf stretches (stand facing a wall, step one foot back, press heel flat to floor) significantly reduce cramp frequency in trials
  • Stay well hydrated throughout the day
  • Review medications with your doctor β€” diuretic timing or dose adjustments can help
  • Magnesium: the Cochrane review found insufficient evidence for magnesium in the general population, but it may help pregnancy-related and dialysis-related cramps; generally safe at 300–400 mg/day
  • Dorsiflexion sleep splints: keep feet in neutral position overnight, preventing plantarflexion that shortens the calf during sleep
  • Quinine was previously used but is no longer recommended due to serious cardiac side effects (arrhythmias, thrombocytopaenia)
leg cramps at nightnocturnal leg crampscalf crampsmuscle cramps causesleg cramps preventionmagnesium for crampsleg cramps older adults

Comments

Leave a comment

No comments yet. Be the first!

Related Articles