cCalorieScan.

Nutrition Science/Oct 5, 2025/3 min read

Magnesium, sleep, and the cravings nobody can explain

Half of US adults are short on magnesium. The downstream effects are subtler than they sound.

MWritten by Maya Lin, RD
Nutrition Science

Magnesium is the mineral that most-cited deficiency stat gets right: somewhere between 30% and 50% of US adults consume less than the EAR (estimated average requirement) of 320mg (women) or 410mg (men) per day.

It's also the mineral most likely to cause vague, subclinical issues — sleep disturbance, muscle twitches, cravings, mild anxiety — without crossing into a diagnosable deficiency.

What magnesium does

Magnesium is a cofactor in over 300 enzymatic reactions. The big ones:

  • Muscle contraction and relaxation (including the heart)
  • Nerve transmission
  • Blood glucose regulation
  • Bone mineralization
  • Sleep architecture (NREM stage in particular)
  • Energy production at the mitochondrial level

A persistent shortfall doesn't crash any one system. It quietly underperforms several.

The food sources

The main magnesium-rich foods:

  • Pumpkin seeds, 1oz: 168 mg (40% DV)
  • Almonds, 1oz: 80 mg (20% DV)
  • Spinach, 1 cup cooked: 157 mg (37% DV)
  • Black beans, 1 cup: 120 mg (29% DV)
  • Dark chocolate (70%+), 1oz: 65 mg (15% DV)
  • Avocado, medium: 58 mg (14% DV)
  • Salmon, 6oz: 53 mg (13% DV)
  • Whole wheat bread, 2 slices: 50 mg (12% DV)
  • Edamame, 1 cup shelled: 100 mg (24% DV)
  • Brown rice, 1 cup cooked: 85 mg (20% DV)

If your diet is mostly white bread, white rice, dairy, and meat, your magnesium is low. The mineral lives in seeds, nuts, leafy greens, beans, and whole grains — exactly the categories most American diets under-eat.

Why supplementation can be reasonable

Magnesium is one of the few minerals where a low-cost OTC supplement is well-tolerated and can reasonably close a dietary gap. The forms:

  • Magnesium citrate. Well-absorbed, mild laxative effect. Good general-purpose form.
  • Magnesium glycinate. Best for sleep / anxiety contexts. Doesn't cause GI issues.
  • Magnesium oxide. Cheap, poorly absorbed, mostly a laxative.
  • Magnesium L-threonate. Marketed for cognitive effects; evidence is thin.

A typical dose for someone with dietary insufficiency: 200–400mg of magnesium glycinate at night. Don't exceed 350mg from supplements without checking with your doctor.

The sleep connection

Magnesium glycinate before bed is one of the few sleep supplements with reasonable evidence. The effect size is modest (10–20% sleep latency improvement in deficient people), but the cost is low and the side effects are minimal.

It's not melatonin. It won't knock you out. But for people who toss and turn for an hour despite being tired, magnesium is worth a 4-week trial.

The cravings angle

There's a nutrition-internet claim that chocolate cravings indicate magnesium deficiency. This is probably not literally true (chocolate has only a moderate amount of magnesium), but the underlying observation might be:

People with magnesium deficiency often have insulin sensitivity issues and disregulated hunger. The cravings aren't for chocolate per se; they're for the carbs/fats your body is mismanaging.

Closing the magnesium gap may quiet the cravings indirectly. It's not magic; it's removing one root-cause noise.

Practical advice

  1. Add 1oz of pumpkin seeds (or a handful of almonds) to your daily diet. That alone covers 30–40% of the gap.
  2. Eat leafy greens 4+ times a week.
  3. Consider 200mg magnesium glycinate at night for a 4-week trial if you have sleep / cramp issues.
  4. Don't supplement at the multivitamin level + the dedicated supplement level. You'll exceed safe intake.
Magnesium is the unexciting mineral that subtly runs the show.

Try the app

CalorieScan AI is the photo-first calorie tracker.

Free on iOS. Snap a meal, get the macros, get on with your life.

Download free on iOS