Dietitians say most people are not getting enough magnesium, and the fix is simpler than you think .
If you have been sleeping badly, waking up tired, or feeling anxious for no clear reason, your diet might have something to do with it. Specifically, you might be low on magnesium.
Magnesium is a mineral your body relies on for more than 300 functions, from keeping your muscles relaxed to helping your brain wind down at night. It is also an essential nutrient your body cannot make on its own, which means you have to get it from what you eat. The problem is that most people are not getting nearly enough. According to data from the US National Health and Nutrition Examination Survey, roughly 48% of Americans consume less magnesium than their body needs. Globally, the World Health Organization estimates that around 80% of people fall below the recommended daily intake.
The symptoms of low magnesium are easy to miss and easy to blame on other things: trouble falling asleep, waking up in the middle of the night, muscle cramps, low mood, and that frustrating feeling of being exhausted but unable to switch off.
The good news is that the solution is not complicated. You do not need a supplement to start with. You just need to know which everyday foods to reach for.
Why Magnesium-Rich Foods Help Your Sleep and Mood
Your brain has a natural calming system. The main signal it uses to slow down and prepare for sleep is a chemical called GABA. Magnesium helps activate GABA receptors, which is the brain’s mechanism for winding down at night. When magnesium levels are low, that system does not work as efficiently and the brain stays on high alert.
Magnesium also helps the body produce melatonin, the hormone that signals it is time to sleep, and it lowers cortisol, the stress hormone that keeps you wired when it should be dropping. Registered dietitian Mckenzie Dryden of HonorHealth Integrative Medicine told GQ: “If we don’t get enough magnesium, then we’re not going to produce enough serotonin, which can lead to those negative moods.”
Research published in the journal Nutrients in 2020 and in Frontiers in Public Health in 2024 both found associations between adequate magnesium intake and lower rates of depression and anxiety. A 2024 randomized controlled trial published in Sleep Medicine X found that participants who supplemented with magnesium showed significantly improved sleep scores, with 57% reporting more refreshing sleep compared to 29% in the placebo group. A separate 2025 trial published in Natural Science of Sleep found improvements in sleep efficiency and reduced nighttime awakenings in the magnesium group compared to placebo.
Pumpkin Seeds

Pumpkin seeds are one of the richest sources of magnesium available. A small handful, about one ounce, covers roughly 37% of your daily magnesium needs. They also contain tryptophan, which helps your brain produce melatonin. Sprinkle them on a salad, stir them into yogurt, add them to oatmeal, or keep a small bag at your desk for a quick snack.
Spinach

Half a cup of cooked spinach contains around 78 milligrams of magnesium, making it one of the most concentrated food sources of the mineral. Add it to scrambled eggs in the morning, throw a handful into a pasta sauce, blend it into a smoothie, or use it as a base for a lunch salad. Cooking spinach increases the magnesium per serving because the leaves reduce in volume, meaning you end up eating more of it in a single portion.
Almonds and Cashews

A one-ounce serving of cashews provides around 83 milligrams of magnesium. Almonds are close behind. Both are portable, require no preparation, and fit into any part of the day. Keep a small jar at your desk or in your bag. A handful of mixed nuts between meals is one of the fastest ways to add magnesium to your diet without changing anything else about how you eat.
Bananas

One medium banana contains around 32 milligrams of magnesium alongside potassium, which supports muscle relaxation. The natural carbohydrates in bananas also help the brain process tryptophan into serotonin and melatonin, the hormones involved in sleep regulation. A banana is a practical pre-bed snack, particularly for people who wake up with muscle cramps or have difficulty winding down at night.
Avocados

One whole avocado provides around 58 milligrams of magnesium. On toast in the morning, sliced into a salad at lunch, or mashed with lemon and salt as a side at dinner, it fits into most meals without any real effort. Avocados also provide healthy fats that support brain function, adding value beyond their magnesium content alone.
Black Beans and Lentils

A cup of cooked black beans contains around 120 milligrams of magnesium, one of the highest amounts found in any single food. Lentils are similarly rich. Add either to soups, stews, rice dishes, or salads. They are inexpensive, filling, and easy to cook in bulk. A lentil soup or a simple rice-and-beans dish at dinner can cover a substantial portion of the daily magnesium requirement in a single meal.
Dark Chocolate

One ounce of good-quality dark chocolate with at least 70% cocoa contains around 64 milligrams of magnesium alongside antioxidants. A small square after dinner is enough to count. It does not take much to get the benefit, and it is one of the more straightforward ways to add magnesium to the end of your day.
How Much Magnesium You Actually Need
The recommended daily intake is 400 to 420 milligrams for adult men and 310 to 320 milligrams for adult women. Hitting those numbers through food is achievable once you know where to look. According to Cleveland Clinic registered dietitian Anna Taylor, the approach does not require counting milligrams on every label. Eating five servings of fruits and vegetables daily, at least three servings of whole grains, and a small handful of nuts or seeds covers most of what the body needs.
A practical day of magnesium-rich eating might look like this: a banana or a spinach smoothie with pumpkin seeds in the morning, a salad with avocado and chickpeas at lunch, a handful of almonds as a snack, a lentil or bean-based dish at dinner, and a square of dark chocolate to finish. That combination alone gets close to the daily requirement without any supplements.
Unlike supplements, which can cause nausea, cramping, and digestive discomfort in higher doses, magnesium from food is safe because the kidneys eliminate any excess naturally. If persistent sleep problems or low mood continue despite dietary changes, speaking with a doctor is the appropriate next step.



