Why You Get Leg Cramps at Night — and How Athletes Prevent Them

Why You Get Leg Cramps at Night — and How Athletes Prevent Them

The 2am Calf Cramp: Why Night Cramps Happen and How Active People Prevent Them

By the Omnicare Team · 8 min read

You know the moment. Dead asleep, and then — a calf muscle seizes like it's been plugged into a wall socket. You're instantly awake, gripping your leg, half-hopping out of bed, trying to force your foot flat while the muscle fights back. Thirty seconds that feel like five minutes. And even after it releases, the calf stays tender into the next morning's run.

Nocturnal leg cramps hit up to 60% of adults at some point, and they have a special fondness for active people: runners, lifters, cyclists, weekend warriors, and anyone whose training volume just jumped. If you're getting them regularly, they're not random bad luck — they're usually a signal. Here's what's actually going on, and the prevention playbook that works.

What a Cramp Actually Is

A cramp is a motor-control glitch: a muscle receives a sustained "contract" signal without the matching "release" signal, locking it in full contraction. Calves are the most common target because they're relatively short, work hard all day, and spend the night in a shortened position when you sleep with your toes pointed — which primes them to seize.

Why the signal misfires is usually a pile-up of several contributors rather than one villain:

Muscle fatigue. The best-supported trigger. Hard or unaccustomed training — a longer run, a new leg day, a big hike — leaves the nerves controlling those muscles hyperexcitable for hours afterward. This is why cramps love to strike the night after your biggest session.

Fluid and electrolyte shifts. Sweating drains water along with sodium, potassium, calcium, and magnesium — the minerals your nerves and muscles use to fire and release properly. Train hard in the evening, rehydrate with plain water only, and you can go to bed with your electrolytes diluted right when your fatigued muscles need them most.

Low magnesium status specifically. Magnesium sits on the "relax" side of the muscle equation: calcium drives contraction, and magnesium helps regulate the release. Run chronically low — which roughly half of adults do through diet alone — and you've removed one of the brakes. Athletes lose magnesium through sweat on top of the dietary gap, which is why it shows up so often in sports-recovery conversations.

Position and circulation. Sleeping toes-pointed under a heavy blanket keeps calves shortened all night. Add long days of sitting, and the muscle rarely reaches its full length.

Age and other factors. Cramps get more common past 50 as muscles lose mass and nerves get twitchier. Pregnancy, certain medications (some diuretics and statins among them), and some medical conditions also raise the risk — if cramps are frequent, severe, or come with swelling or numbness, that's a doctor conversation, not a supplement decision.

The Prevention Playbook

No single fix works for everyone, because cramps rarely have a single cause. Stack these instead:

1. Stretch the calves before bed — every night, not just after training

The cheapest intervention with some of the best evidence. Three rounds of a wall calf stretch (30 seconds each leg, knee straight, then knee slightly bent) before bed lengthens the muscle right before it spends eight hours shortened. Consistency matters more than intensity — nightly stretching for a few weeks is what studies show reduces cramp frequency.

2. Rehydrate with electrolytes, not just water

After a sweaty session — especially evening training — plain water rehydrates your blood volume while further diluting your electrolytes. Add sodium and minerals back: an electrolyte tab, salty food with dinner, or simply not avoiding salt on heavy training days.

3. Close the magnesium gap

This is the piece most active people are missing without knowing it. Between the dietary shortfall most adults already have and the extra losses through sweat, athletes are a high-risk group for running low — and magnesium is directly involved in normal muscle contraction and relaxation.*

Food first: pumpkin seeds, almonds, spinach, black beans, and whole grains are the workhorses. But if you're training hard and your diet is normal-human rather than perfect, a daily supplement is the practical way to close the gap. Form matters here — we broke down all 8 forms in detail, but the short version for cramp-prone athletes: glycinate is gentle and calming for evening use, malate is favored for muscle recovery, citrate absorbs well, and aspartate supports normal muscle function.* A full-spectrum magnesium complex covers all of those bases in one dose — which beats guessing which single form your legs are asking for.

Timing tip: take it in the evening, about an hour before bed. You put magnesium on board right before the hours when cramps strike, and its relaxation support doubles as part of a wind-down routine.* (If you're also the tired-but-wired type, that's a whole story of its own.)

4. Manage the training spike

Most cramp clusters follow a sudden jump in volume or intensity. The 10% rule is crude but useful: ramp weekly volume gradually, and expect cramp-prone nights after races, PR attempts, or your first week back. On those nights, be extra deliberate about the stretch + electrolytes + magnesium routine.

5. Fix the sleeping position

Small mechanical wins: loosen tucked-in sheets so your feet aren't forced into a pointed position, sleep on your side with knees slightly bent, or let your feet hang off the mattress edge if you sleep on your stomach.

When a Cramp Hits Anyway: The 30-Second Protocol

Prevention fails sometimes. When it does:

  1. Straighten the leg and pull your toes toward your shin — with your hand, a towel around the foot, or by standing and pressing the heel down. Forcing the muscle to lengthen is the off switch.
  2. Hold, don't bounce. Steady pressure until it releases.
  3. Massage and warmth afterward to settle the muscle and ease next-day soreness.

The Bottom Line

Night cramps in active people are almost always a stack of small deficits — a fatigued muscle, a fluid and electrolyte dip, a magnesium gap, a shortened sleeping position — that add up to one loud 2am alarm. Attack the stack: stretch nightly, rehydrate with minerals, keep your magnesium topped up, ramp training sensibly. Most people who do all four see cramps fade from a weekly ambush to a rare annoyance.

Your legs do the work. Give them what they need to switch off.


Train hard, sleep uninterrupted. Omnicare Magnesium Complex – 8 Forms for Maximum Absorption combines glycinate, malate, citrate, aspartate and more in one high-absorption evening dose — supporting normal muscle function, recovery, and restful sleep.* Backed by our 30-day guarantee: feel the difference or pay nothing.

Shop Magnesium Complex →


*These statements have not been evaluated by the Food and Drug Administration. This product is not intended to diagnose, treat, cure, or prevent any disease. This article is for informational purposes only and is not a substitute for medical advice. Frequent or severe cramps, or cramps accompanied by swelling, numbness, or skin changes, should be evaluated by a healthcare provider. Consult your provider before starting any supplement, especially if you are pregnant, nursing, taking medication, or managing a health condition.