June 23, 20268 min read

Why You Wake Up at 3AM Every Night (And How to Stop)

It's 3:14 am. Again. Your eyes snap open before the alarm gets anywhere near its job, and you already know how the next forty minutes are going to go: a pounding heart you can hear in your pillow, calves that feel like they're about to seize, and a brain that decides this is the perfect time to re-litigate an email you sent in 2019.

If this is you most nights — especially since starting keto, carnivore or any low-carb diet — you're not imagining it, and it's not random. There's a real biological mechanism behind the 3am wakeup, and once you understand it, it's usually fixable in about four nights.

The short answer

For most low-carb eaters, waking up at 3am is caused by two things stacking on top of each other:

  1. A natural cortisol pulse that happens between 2 and 4am in every healthy human.
  2. Low electrolytes — specifically sodium, potassium and magnesium — that turn that small cortisol pulse into a five-alarm fire.

Fix the electrolytes and the cortisol pulse becomes invisible again, the way it is for someone who eats 300g of carbs a day and sleeps like a log.

What's actually happening at 3am

Your body runs on a 24-hour hormone cycle. Around the middle of the night, cortisol — your "wake up and move" hormone — starts rising. It peaks roughly an hour before you normally get up. This is by design. Cortisol is what gives you the energy to swing your legs out of bed in the morning.

In someone who eats plenty of carbs and has a full mineral tank, that pre-dawn cortisol pulse is silent. You sleep right through it. In someone on keto or carnivore who's running low on minerals, the same pulse jolts you awake — often with a racing heart, sometimes with cramps, almost always with that distinctive "wired but exhausted" feeling.

Why low-carb wrecks your minerals

When you cut carbs below about 100g per day, your insulin drops. Lower insulin tells your kidneys to dump sodium. And where sodium goes, water and potassium follow. Add in the fact that magnesium is hard to get from food even on a great diet, and within a few weeks of going low-carb your electrolyte tank is half-empty.

Most low-carb eaters flush sodium, potassium and magnesium roughly 3 to 5 times faster than someone eating standard carbs. Nobody tells you this. So you blame the diet, or your age, or stress, and suffer through it for months.

How the 3am wakeup actually feels

It usually shows up as one of three flavors:

  • The charley horse. You shoot upright clutching your calf. The cramp lasts 30 seconds; the ache lingers all day. That's low magnesium and low potassium.
  • The racing heart. You wake up with your pulse pounding in your ears. It feels like anxiety but isn't — it's your body trying to compensate for low sodium and low magnesium with adrenaline.
  • Wired but exhausted. No cramp, no pounding heart, just a fully awake brain at 3:30am that knows you have to work in four hours. That's the cortisol pulse landing on a half-empty mineral tank.

What to do about it (tonight)

Here's a starter version of the fix. The full doses, timing, and brand picks are in the 20-page guide, but this alone is enough to feel a difference by night two:

  1. Add 2,000–3,000 mg of sodium through the day. Salt your food generously. A pinch of salt in your water counts.
  2. Take 300–400 mg of magnesium glycinate 30 minutes before bed. Glycinate is the form that actually absorbs and is gentle on your stomach. Citrate and oxide are mostly laxatives.
  3. Use lite salt (the kind with potassium chloride) on at least one meal a day. That's the cheapest, simplest potassium source.

Most readers report a meaningful change by the second night, and a full reset — no cramps, calm heart, sleeping until morning — by day five to seven.

What to skip

A few things commonly recommended online that mostly don't work:

  • "Just drink more water." If your minerals are low, adding plain water actually makes the problem worse by diluting what little you have.
  • Magnesium oxide. The cheapest form, and the worst absorbed. You'll spend $8 and visit the bathroom a lot.
  • Sugary sports drinks. They'll fix electrolytes but kick you out of ketosis if that matters to you.

When it isn't electrolytes

Electrolyte imbalance covers maybe 80% of low-carb 3am wakeups, but not all. If you've been dialed in on minerals for two weeks and still wake up every night, look at: alcohol within four hours of bed, late caffeine, a bedroom warmer than 68°F, or — if it's been months — a basic thyroid panel from your doctor.

The bottom line

Waking up at 3am with cramps or a racing heart is almost never something going wrong with you. It's something completely normal (the cortisol pulse) being amplified by something completely fixable (low minerals). Get the sodium, potassium and magnesium right, and most nights look very different very quickly.

Free guide

The 3 worst foods for 3am wakeups

A free 1-page PDF. Drop your email and I'll send it over.

Free 1-page guide

The 3 worst foods for 3am cramps

Drop one of these from dinner and most readers sleep through the night within a week. Free, no spam, unsubscribe anytime.

The full protocol

Ready for the exact doses, timing, and brands?

The 20-page guide is what most readers fix it with in four nights. $24, one-time, 60-day refund.

Get The 3AM Protocol — $24 →