Magnesium-Rich Foods That Help You Sleep
TL;DR
- Many adults take in less magnesium than recommended, and food is the primary route to an adequate intake.
- On the EU authorised list, magnesium contributes to normal nervous system function, normal muscle function, and the reduction of tiredness and fatigue, once intake is adequate.
- The richest food sources are pumpkin seeds, leafy greens, nuts, legumes, whole grains, and dark chocolate.
- A dietary pattern that regularly includes these foods is the sensible way to meet the recommended intake.
- For supplement forms and detail, the linked articles cover that separately.
Magnesium is one of the minerals people most often fall short on, and it's involved in nervous system and muscle function. For most people, food is the primary way to reach an adequate intake. Here's why magnesium matters, which foods carry the most, and roughly how much each provides.
Why magnesium matters
Magnesium takes part in hundreds of processes in the body, including the workings of the nervous system and muscles. On the EU authorised list, magnesium contributes to normal psychological function, normal nervous system function, normal muscle function, the reduction of tiredness and fatigue, and normal electrolyte balance. Each of those applies once you have enough magnesium in the first place, which is the point of getting sufficient intake.
That's the honest frame. Magnesium's authorised benefits are tied to correcting a shortfall, not to any single sleep outcome, and food is where most people can close the gap.
How common is a low intake
Survey data from the United States found that almost half of the population takes in less magnesium than the recommended amount (Rosanoff et al., 2012), and similar patterns appear across other Western countries. The recommended daily intake for adults is roughly 310 to 420mg depending on age and sex. Diets heavy in refined grains and processed foods tend to fall short, because magnesium is concentrated in whole plant foods and largely stripped out in refining. Whole foods are the fix.
Foods highest in magnesium
Pumpkin seeds are among the richest sources per serving. A 30g serving provides roughly 150mg, a large share of the daily target. They work as a snack, on salads, or stirred into yoghurt.
Dark leafy greens, spinach and Swiss chard in particular, are excellent. A cup of cooked spinach provides around 150mg, along with folate and other nutrients.
Almonds give about 75mg per 30g serving and add a little protein and healthy fat, which makes them a steady evening snack.
Legumes, including black beans and lentils, provide roughly 60 to 120mg per cooked cup depending on the type, alongside fibre and protein.
Whole grains like oats, quinoa, and brown rice carry moderate magnesium, well above their refined versions, since refining removes the germ and bran where the magnesium sits.
Dark chocolate at 70% cocoa or higher provides around 60mg per 30g. It also contains some caffeine and theobromine, so it's better earlier in the day than right before bed.
Avocado adds around 58mg per fruit, along with potassium and healthy fat.
Getting the most from your food
Not all dietary magnesium is absorbed. Phytates in whole grains and legumes bind some of it, and soaking, sprouting, or fermenting these foods reduces phytates and improves absorption. Regular alcohol and a high-sugar diet both increase how much magnesium you lose in urine, which raises how much you need from food. The practical goal is variety and consistency: a bit of magnesium from several sources across the week beats a single food eaten now and then.
Food or supplements
For most people eating a varied whole-food diet with the foods above, dietary magnesium can be enough to reach an adequate intake, which is the aim. If you're considering a supplement, the forms and how they differ are covered in magnesium for sleep and, for the gentle chelated form, magnesium glycinate for sleep. This article stays on the food side. For the wider food picture, see foods that help you sleep.
What this means for your sleep
Meeting your magnesium intake through food is a sensible, low-effort habit, and for many people a typical diet falls short. Building pumpkin seeds, leafy greens, nuts, legumes, and whole grains into the week is the straightforward way to close the gap. Magnesium's authorised benefits follow from having enough in the first place, so the goal is a steady, adequate intake built up across the week.
Frequently asked questions
Which foods are highest in magnesium?
Pumpkin seeds, dark leafy greens like spinach, almonds, legumes, whole grains, dark chocolate, and avocado are among the richest sources. Pumpkin seeds and cooked spinach top the list per serving.
How much magnesium do I need?
The recommended daily intake for adults is roughly 310 to 420mg, depending on age and sex. Many people on a typical Western diet fall below that.
Can I get enough magnesium from food alone?
For most people eating a varied whole-food diet that regularly includes the foods above, yes. Whole plant foods are the primary route to an adequate intake.
Do I need a magnesium supplement for sleep?
Not necessarily. Food is the first place to look. The linked articles cover supplement forms if you want to consider one, and it's worth checking with a professional if you're on medication or have a health condition.
Disclaimer
This article is for general information and education only. It is not medical advice, and it does not diagnose, treat, or prevent any condition. Food supplements are not a substitute for a varied diet and a healthy lifestyle. If you are pregnant, breastfeeding, taking medication, or living with a health condition, speak with a qualified healthcare professional before starting any supplement.
Sources
- Rosanoff A, Weaver CM, Rude RK. (2012). Suboptimal magnesium status in the United States: are the health consequences underestimated? Nutrition Reviews. https://pubmed.ncbi.nlm.nih.gov/22364157/
- U.S. Department of Agriculture, Agricultural Research Service. FoodData Central. https://fdc.nal.usda.gov/
Related reading: Magnesium for Sleep: Which Type Works Best | Magnesium Glycinate for Sleep: Why This Form | Foods That Help You Sleep Better Tonight
About the Author

Nima Koucheki
Founder, Sleep Improvers
Nima Koucheki is the founder of Sleep Improvers. He hosts a podcast and YouTube channel dedicated to sleep science, translating peer-reviewed research into protocols anyone can apply tonight.