Keto Leg Cramps at Night: The Three-Mineral Fix
You're asleep at 2:30am. Suddenly your calf locks up like someone hit it with a hammer. You bolt upright, grab your leg, and spend the next thirty seconds trying not to swear loudly enough to wake the house. The cramp fades, the ache stays for the rest of the day.
Nocturnal leg cramps on keto or carnivore are almost always three minerals in this order: magnesium first, potassium second, sodium third. Fix all three and the cramps stop, usually within two nights.
Why keto causes them
Muscle contraction is triggered by calcium moving into the muscle cell. Muscle relaxation is triggered by magnesium and potassium pushing that calcium back out. When either mineral is low, the muscle contracts and forgets to release — that's a cramp. Sodium plays a supporting role because low sodium raises adrenaline, which makes muscles twitchy in general.
The three-mineral fix
- Magnesium glycinate — 300–400 mg, 30–45 minutes before bed. This is the biggest single lever for cramps. If you only do one thing, do this.
- Potassium chloride — 1,000–2,000 mg through the day, via "No Salt" or "Lite Salt." A quarter teaspoon on dinner is roughly 800 mg.
- Sodium — 3,000–5,000 mg daily, weighted toward the second half of the day.
The "cramp is happening right now" fix
If you're standing on a bathroom tile at 2am reading this on your phone: pinch of salt under the tongue, big glass of water, walk on the leg for 60 seconds. That'll break the current cramp in about a minute. The three-mineral fix above is what stops the next one.
What doesn't work
- Bananas. ~400 mg potassium, ~30g carbs. Not worth it on keto.
- Pickle juice. Fine sodium hit, no magnesium, no potassium.
- Quinine / tonic water. Old wives' tale; the dose in tonic is tiny and the sugar isn't free.
Free guide
The 3 worst foods for 3am wakeups
A free 1-page PDF. Drop your email and I'll send it over.