9 min readMagnesium-rich foods to help you sleep better
Equipo TriwellMarch 20, 20269 minDo you struggle to fall asleep at night? Before turning to supplements or pills, maybe the solution is in your pantry. Magnesium is one of the most underrated minerals in our diet, and its relationship with sleep quality is backed by solid scientific evidence.
According to data from the EFSA (European Food Safety Authority), around 30% of the European population does not meet the recommended daily intake of magnesium: between 300 and 400 mg daily, depending on sex and age. In Spain, the National Dietary Intake Survey revealed similar numbers. This is no minor detail, because magnesium is involved in more than 300 enzymatic reactions in the body, including those that regulate the nervous system and the sleep-wake cycle.
## Why Magnesium Is Key for Good Sleep
Magnesium acts on sleep through several mechanisms. First, it activates the parasympathetic nervous system, which is responsible for preparing your body for rest. Second, it regulates melatonin, the hormone that sets your circadian rhythms. And third, it binds to GABA receptors, the neurotransmitter that slows brain activity and helps calm the mind.
A meta-analysis published in 2022 in BMC Complementary Medicine and Therapies reviewed 3 controlled clinical trials and concluded that magnesium supplementation significantly improved the subjective quality of sleep in older adults. But here’s something many articles don’t mention: getting magnesium from food is more effective than taking it in pill form, because it is better absorbed when accompanied by other nutrients like vitamin B6 and zinc, which occur naturally in foods.
## The 12 Foods Highest in Magnesium to Improve Your Sleep
### 1. Pumpkin Seeds: The Absolute Champion
With 156 mg of magnesium per 30 grams (a small serving), pumpkin seeds are the food with the highest concentration of this mineral. That’s almost 40% of the recommended daily amount in a handful you can eat as a snack. They also contain tryptophan, the amino acid precursor to serotonin and melatonin.
My advice: add them to a dinner salad or mix them with plain yogurt an hour before bedtime.
### 2. Almonds
80 mg of magnesium per 30 grams. Almonds have an additional benefit: they provide melatonin directly. A 2021 Purdue University study found that consuming almonds before bed reduced inflammation markers and improved sleep quality in people with disrupted sleep.
### 3. Spinach (and Other Dark Leafy Greens)
One cup of cooked spinach provides about 157 mg of magnesium. Swiss chard and beet greens are just as good. The trick is to lightly steam them so the minerals are concentrated without destroying other nutrients.
### 4. Dark Chocolate (85% Cocoa or More)
This is the one everyone likes to hear about. About 30 grams of quality dark chocolate offers around 65 mg of magnesium. But be careful with two things: that it’s truly high in cocoa content (chocolates with 50-60% have much more sugar and less mineral) and don’t eat it right before bed, as the theobromine has a slight stimulating effect. Better two hours before.
### 5. Avocado
Half an avocado contains approximately 58 mg of magnesium, plus healthy fats that promote the absorption of fat-soluble nutrients. It’s perfect for dinner because it’s filling without being heavy.
### 6. Banana
While not the richest in magnesium (37 mg per unit), banana combines this mineral with potassium and vitamin B6, creating a perfect trio for relaxing muscles and aiding melatonin production. Some call it the natural sleeping pill par excellence.
### 7. Legumes: Chickpeas, Lentils, and Black Beans
One cup of cooked black beans provides 120 mg of magnesium. Chickpeas, about 79 mg. The interesting thing about legumes is they’re also rich in fiber, which helps stabilize blood sugar during the night, avoiding those hypoglycemia-induced awakenings that many people don’t even recognize as such.
### 8. Salmon and Mackerel
Salmon contains about 53 mg of magnesium per 150 grams, but its true ace in the hole is the omega-3 fatty acids, which according to a study published in the Journal of Clinical Sleep Medicine in 2014 improve sleep quality by regulating serotonin production.
### 9. Chia Seeds
Two tablespoons (28 g) provide 111 mg of magnesium. What makes them special is you can prepare a chia pudding the night before and have it ready as a bedtime snack: chia with almond milk and a pinch of cinnamon.
### 10. Cashews
74 mg per 30 grams. They’re creamy, versatile, and go well with almost any dinner dish. They also provide copper and zinc, two minerals that work synergistically with magnesium.
### 11. Quinoa
One cup cooked has about 118 mg of magnesium. Unlike white rice, quinoa has a lower glycemic index, avoiding sugar spikes that can disrupt sleep. It’s an excellent base for light dinners.
### 12. Tofu
Half a cup of firm tofu provides approximately 53 mg of magnesium. For those following a plant-based diet, it’s a source of protein that pairs well in veggie scrambles or stir-fries for dinner.
## How to Organize Your Dinners to Maximize Magnesium
It’s not enough to know the foods; the key is to combine them intelligently. Here are three magnesium-rich dinner ideas that I’ve personally tried and that work:
**Dinner 1 — Warm Salad:** Sauteed spinach with grilled salmon, pumpkin seeds, half an avocado, and a drizzle of lemon. Estimated total magnesium: ~280 mg.
**Dinner 2 — Quinoa Bowl:** Quinoa with spiced chickpeas, baby spinach, chopped cashews, and tahini sauce. Estimated total magnesium: ~310 mg.
**Dinner 3 — Avocado Toast Plus:** Whole-grain bread with avocado, marinated tofu, and sprinkled chia seeds. For dessert, two squares of dark chocolate. Estimated total magnesium: ~240 mg.
## What the Competition Doesn’t Tell You: Absorption and Antinutrients
Here’s something you rarely find in other articles about magnesium. Not all the magnesium you ingest is absorbed. Phytates present in legumes, whole grains, and nuts can reduce mineral absorption by up to 60%.
The solution? Soak legumes for at least 12 hours before cooking. Lightly toast nuts. And combine magnesium-rich foods with vitamin C (a bit of lemon, pepper, or tomato) to counteract the phytates.
Another factor few mention: coffee, alcohol, and excess refined sugar increase the renal excretion of magnesium. If you drink three coffees a day and sleep poorly, it’s not just the caffeine; you’re also losing more magnesium in your urine.
## When to Expect Results
Don’t expect to sleep like a baby the first night. Dietary magnesium works cumulatively. In my experience, most people start to notice improved sleep quality after 2-3 weeks of consistently increasing their intake. Clinical studies usually assess effects at 8 weeks.
If you don’t notice any difference after a month, there may be other factors involved: chronic stress, screen exposure, lack of physical activity, or thyroid issues. Magnesium helps, but it’s not a magic bullet.
## Signs You’re Lacking Magnesium
Before finishing, here’s a helpful tip. Your body gives you clues when magnesium is scarce:
- Nighttime muscle cramps, especially in the calves - Eyelids twitching for no apparent reason - Constant fatigue even if you sleep enough hours - Difficulty relaxing your mind at bedtime - Chocolate cravings (yes, your body is wise)
If you recognize three or more of these symptoms, your diet probably needs an adjustment in this direction.
## Conclusion
Improving your sleep through nutrition is one of the most sustainable and healthy strategies available. It doesn’t require expensive supplements, has no side effects, and in the process improves your cardiovascular, bone, and muscle health. Start by incorporating 2-3 foods from this list into your dinners and observe how your body responds. Magnesium is not the solution to every sleep problem, but for many people, it’s the missing piece of the puzzle.