20 Magnesium-Rich Foods to Eat at Dinner for a Better Night’s Sleep

Magnesium is one of the most underrated minerals when it comes to sleep quality — and most people don’t get enough of it. It’s involved in over 300 biochemical reactions in the body, including the ones that regulate the nervous system, muscle relaxation, and the production of melatonin, the hormone that signals your body it’s time to rest.

A shortfall in magnesium has been linked to poor sleep, muscle cramps, and heightened stress response, which is exactly why building a magnesium-rich dinner can make a real difference for how well — and how long — you sleep.

How Much Magnesium Do You Actually Need?

According to the National Institutes of Health’s Office of Dietary Supplements, the recommended daily amount for adults is 400–420 mg for men and 310–320 mg for women, with slightly higher needs during pregnancy. For context, roughly half of Americans don’t hit that target through diet alone — which is part of why a magnesium-focused dinner is worth the extra thought, rather than relying on supplements by default.

One safety note worth knowing: the 350 mg upper limit you may see cited online applies only to supplemental magnesium (pills, powders, magnesium-based laxatives), not to magnesium from food.

Getting your magnesium from real food is essentially self-limiting — your kidneys excrete the excess — so there’s no meaningful risk of “overdosing” through the foods below.

20 Foods to Add to Your Dinner Plate

  1. Spinach — around 79 mg per 100g. Sauté with olive oil and garlic, which also helps with nutrient absorption.
  2. Swiss chard — about 81 mg per 100g, and rich in fiber, which supports digestion.
  3. Almonds — roughly 270 mg per 100g. A small handful in the evening is a simple way to add both magnesium and healthy fats.
  4. Pumpkin seeds — about 262 mg per 100g, plus a solid dose of zinc for immune support.
  5. Avocado — around 58 mg per 100g, along with potassium, which helps prevent nighttime muscle cramps.
  6. Banana — about 32 mg per medium banana, plus tryptophan and potassium, both linked to easier sleep onset.
  7. Dark chocolate (70%+ cacao) — roughly 228 mg per 100g. A small square after dinner is a reasonable way to work it in.
  8. Plain yogurt — contains magnesium, calcium, and probiotics that support gut health, which is increasingly linked to sleep quality.
  9. Tofu — about 53 mg per 100g, and a good lean plant-based protein for dinner.
  10. Dried figs — around 68 mg per 100g, and a natural source of small amounts of melatonin.
  11. Salmon — a solid magnesium source that also delivers omega-3 fatty acids and vitamin D, both associated with better sleep regulation.
  12. Lentils — about 36 mg per 100g, a great base for a light, filling dinner.
  13. Quinoa — around 64 mg per 100g cooked, with more protein than most grains.
  14. Chia seeds — one of the most concentrated sources, at roughly 335 mg per 100g, along with fiber and omega-3s.
  15. Brazil nuts — about 376 mg per 100g, plus selenium, important for brain and thyroid function.
  16. Black beans — around 70 mg per 100g, and a strong plant-based protein option.
  17. Turkey — rich in both magnesium and tryptophan, which supports serotonin and melatonin production.
  18. Dates — a natural source of magnesium and sugars that can help take the edge off evening stress.
  19. Watercress — about 38 mg per 100g, a light, peppery addition to a nighttime salad.
  20. Warm milk — contains magnesium, calcium, and tryptophan; the “warm milk before bed” tradition has some real nutritional backing.

What the Research Actually Shows

It’s worth being precise about the evidence here, because a lot of sleep-and-magnesium content overstates it. A widely cited 2012 clinical trial in elderly adults with insomnia found that eight weeks of magnesium supplementation improved several sleep measures, including sleep time and early-morning awakening, along with modest increases in melatonin.

A more recent 2021 systematic review, however, concluded that while the existing trials are promising, they tend to be small, and higher-quality research is still needed before magnesium can be called a proven insomnia treatment.

The honest takeaway: magnesium-rich foods are a reasonable, low-risk part of a sleep-supportive evening routine — not a guaranteed fix on their own.

Three Recipes That Combine These Foods

Spinach and Avocado Salad

2 cups fresh spinach, 1 sliced avocado, ¼ cup sliced almonds, ¼ cup pumpkin seeds, ¼ cup chopped dried figs. Dress with the juice of one lemon, 2 tablespoons olive oil, salt, and pepper.

Quinoa with Salmon and Asparagus

Cook 1 cup quinoa according to package instructions. Season 2 salmon fillets with salt, pepper, and lemon juice, then pan-sear in olive oil, about 4–5 minutes per side. Sauté a bunch of asparagus in the same pan. Stir 2 tablespoons chia seeds into the cooked quinoa and serve everything together.

Banana Almond Smoothie

Blend 1 ripe banana, 1 cup almond milk, ¼ cup plain yogurt, 2 tablespoons almond butter, 1 tablespoon chia seeds, and honey to taste, if desired.

Tips for Getting the Most Out of a Magnesium Dinner

  • Cut back on caffeine and added sugar in the evening — both can interfere with sleep regardless of what else you eat.
  • Pair magnesium-rich foods with healthy fats or protein, which can support better absorption.
  • Keep a consistent sleep schedule. Diet helps, but circadian rhythm consistency remains the single biggest lever for sleep quality.
  • Talk to a doctor before supplementing if you take medications, since magnesium can interact with certain antibiotics, diuretics, and osteoporosis drugs — food sources don’t carry that same interaction risk.

The Bottom Line

Magnesium won’t single-handedly cure insomnia, but a dinner built around foods like leafy greens, nuts, seeds, legumes, and fatty fish gives your body real support for the biological processes behind restful sleep — without the guesswork or risk that comes with high-dose supplements.

References

  • National Institutes of Health, Office of Dietary Supplements — Magnesium: Fact Sheet for Consumers
  • National Institutes of Health, Office of Dietary Supplements — Magnesium: Fact Sheet for Health Professionals
  • Harvard T.H. Chan School of Public Health, The Nutrition Source — Magnesium
  • Abbasi, B., et al. “The effect of magnesium supplementation on primary insomnia in elderly: A double-blind placebo-controlled clinical trial.” Journal of Research in Medical Sciences, 2012.
  • Arab, A., et al. “The role of magnesium in sleep health: a systematic review of available literature.” Biological Trace Element Research, 2023.
  • USDA FoodData Central