Additional menu

Magnesium for sleep? (15 foods)

Written by John Davis

Last updated: October 10, 2022

Quality sleep is vastly important for healthy living. In fact, it may be as critical as exercising and eating nutritiously-balanced diets. Sleep deprivation can increase your risk of cardiovascular diseases, fatigue, poor concentration, and impaired immune function.(1, 2, ,3, 4, 5)

The Centers for Disease Control and Prevention (CDC) estimates more than 35% of American adults have chronic sleep problems (6). Like most people, you may have searched for melatonin supplements as a possible solution to improve your sleep. 

What you might not know; there’s another supplement that can help you relax and potentially improve your insomnia symptoms: magnesium. 

Magnesium and sleep

Magnesium is an essential mineral that plays a role in over 300 processes in your body. It’s necessary for the proper function of your nerves and muscles, blood sugar regulation, bone health, and immune response. (7)

Can Magnesium Help You Sleep? 

The short answer is yes, for some people. While health experts recognize that magnesium plays a critical role in sleep regulation, they are yet to fully understand the precise action of the mineral in affecting sleep patterns. 

Here are a few ways magnesium can potentially improve your sleep:

Improve Insomnia Outcomes

A small clinical trial on the effect of magnesium supplementation on elderly patients with primary insomnia showed that taking 500mg of magnesium daily for eight weeks improved subjective measures of insomnia, such as sleep time, sleep onset latency, and ISI score. (8)

On the other hand, research on hypomagnesemia–low magnesium levels in the body–shows that deficiency leads to fatigue, muscle spasms, anxiety, and depression.(9, 10, 11) All these symptoms also correlate to insomnia. (12)

Relieve Stress

Magnesium supplementation can help you relax, potentially helping you sleep better at night. A 2016 controlled study revealed that magnesium is vital in activating the parasympathetic system. This section of the nervous system controls relaxation and rest. (13)

Magnesium also helps calm the central nervous system through its interaction with gamma-aminobutyric acid (GABA). GABA is an inhibitory neurotransmitter that calms down the nervous system. Magnesium blocks N-methyl-d-aspartate (NMDA), a molecule that inhibits GABA. (14)

Streamline Sleep-Wake Cycles

Melatonin is the hormone responsible for regulating your sleep-wake cycles. Research shows that magnesium is essential in regulating the production of melatonin. Optimizing circadian rhythms can improve the symptoms of insomnia patients. (15)

Ensuring you get your recommended daily allowance of magnesium in your diet can help improve these symptoms and prevent worsening insomnia. 

What’s the Recommended Daily Allowance for Magnesium?

Health experts recommend a daily intake of 310-320milligrams of magnesium for women and 400-420 for men. The RDA depends on several factors: age, sex specified at birth, overall health, and pregnancy. Pregnancy may demand a higher intake at 350-360 mg. (16)

15 magnesium-rich foods  

Luckily, magnesium is naturally available in various foods, making meeting the recommended daily allowance easier. Here are 15 foods you should consider including in your diet to provide magnesium for sleep: 

1. Dark, Leafy Greens

Leafy greens are an excellent source of multiple nutrients, including magnesium. Magnesium is found in chlorophyll, the molecule that gives plants their vibrant green color. Spinach, kale, collard greens, and Swiss chard are all rich in magnesium, which can help improve your sleep patterns. 

For instance, one cup of spinach( 180g) provides approximately 156.6mg of magnesium. This is about 37% of the recommended daily allowance(DV). (17) One cup of cooked Swiss Chard(175g) offers 150.5mg of magnesium or 36% of the daily requirement. (18)

Dark leafy greens are also packed with several other nutrients, such as iron, manganese, and vitamins C, K, and E. You can allocate a portion of your plate for the greens every time you eat. 

2. Nuts

Nuts are a good source of magnesium. The best nuts to eat for magnesium intake include walnuts, almonds, cashews, and Brazil nuts. The amount in each nut varies depending on its size and weight. 

For instance, one ounce of Brazil nuts (28g or six kernels) can provide up to 106.8 mg of magnesium, or 25% of the recommended intake. One ounce of dry roasted almonds (28g or 22 whole kernels) has 79.2mg of magnesium. This equates to 19% of the daily allowance. (19, 20)

Cashew nuts can provide 20% of the DV per serving, walnuts 15%, while peanuts offer 12%. (21, 22, 23) You can achieve your daily intake requirements by eating a trail mix of nuts plus some seeds as a healthy snack. 

3. Legumes

Besides being excellent sources of plant proteins and dietary fiber, legumes can also help supply your daily magnesium requirements. Magnesium-rich legumes include lentils, black beans, chickpeas, soybeans, and peas. 

For example, one cup serving of black beans, approximately 172g, can provide 120.4mg of magnesium or 29% of the DV. A cup of home-prepared baked beans(253g) offers 108.8mg or 26% of the recommended daily intake(RDI). (24, 25)

Legumes have a low glycemic index, making them an excellent source of magnesium for individuals with blood-sugar regulation issues. They are also rich in potassium, iron, and manganese. You can incorporate the legumes into your stews and salads. 

4. Whole Grains

Whole grains are a family of nutrient-dense plant products that can include grains such as wheat and barley as well as pseudocereals such as buckwheat and quinoa. 

One cup of uncooked buckwheat (170g) has 392.7 mg of magnesium, approximately 94% of the RDI. One cup of cooked amaranth (256g) provides 159.9mg or 39% of the daily requirement per serving. One cup of quinoa(185g) is packed with 118.4mg magnesium(28% of DV). (26, 27, 28)

Most whole grains also contain selenian, fiber, and B vitamins. Additionally, the pseudocereals contain high concentrations of antioxidants and plant proteins. (29)

As gluten-free foods, the pseudocereals make an excellent source of magnesium for sleep for individuals with celiac disease or gluten sensitivity. 

5. Avocado

Avocados are incredibly tasty and nutrient-rich fruits that are excellent sources of magnesium. One medium-sized avocado, approximately 6 ounces or 170g, can provide 58mg of magnesium. This amount is about 15% of the recommended daily intake. (30)

Avocados are also excellent sources of fiber, B vitamins, vitamin K and healthy fats. The low-calorie index makes them an ideal source of magnesium for sleep for people wishing to watch their weight.

You can take avocados plainly in your salads or guacamole mixes. 

6. Banana

Bananas are a great source of magnesium, potassium, and tryptophan. One medium-sized banana has approximately 37mg of magnesium or at least 9% of the daily recommended intake. (31)

Bananas are also high in vitamin C, B6, and fiber content. Tryptophan is an amino acid that helps you sleep better by increasing the amount of serotonin in your body. Serotonin is important in regulating moods, which can help improve the quality of your sleep. (32)

7. Pumpkin and Squash Seeds

Pumpkin seeds are small yet extremely nutritious. Eating a small amount of them can hugely supplement your daily requirement for magnesium, healthy fats, beta carotene, and vitamin C. 

One ounce(28g) of dried pumpkin and squash seeds contains 150 mg of magnesium. This amount is approximately 37% of the DV. (33)

The seeds are also rich in phosphorus, manganese, vitamin K, iron, and zinc. You can add them to your diet, eating them as a healthy snack when roasted. You may also use them as smoothies, Greek yogurt, or salads. 

8. Kiwi

Kiwi is a small, nutrient-dense fruit with a more prominent reputation for its vitamin C levels. However, the fruit is also rich in other nutrients, key among them: magnesium. 

A medium-sized fruit (about 5 ounces) contains about 31 milligrams of magnesium or 7% of the daily recommended intake. (34

Additionally, kiwis contain high potassium, folate, vitamin E, K, and copper levels. They are also rich in antioxidants, playing a critical role in immune responses. 

Their high fiber density alongside low-calorie levels make them an excellent source of magnesium for sleep for individuals watching their weight. 

9. Fatty Fish 

Fatty fish is amazingly nutritious, becoming another excellent source of magnesium. Many types of fish a magnesium-rich. These may include mackerel, salmon, and halibut. 

Six ounces of cooked Atlantic mackerel(170g per serving) contain approximately 164.9 mg of magnesium, nearly 39% of the DV. A six-ounce fillet of yellowfin tuna cooked under dry heat has 71.4 mg of magnesium or 17% of the daily recommended allowance. (35,  36)

Fatty fish is also rich in selenium, B vitamins, potassium, and proteins. Healthy fats can also help reduce the risk of cardiovascular disease. (37)

10. Dark Chocolate(70-85% Cocoa)

Dark chocolate is as nutritious as it is sweet. One ounce of dark chocolate(28g) is packed with 64.8 mg of magnesium, or 15% of the DV. (38)

It is also rich in iron, manganese, prebiotic fiber, and copper. Flavanols present in cacao solids can help prevent LDL-cholesterol oxidation in blood vessels. 

To maximize the benefits of dark chocolate, always pick a brand with at least 70% cacao solids. The higher the percentage, the better. 

11. Yogurt and Milk 

Milk and yogurt are excellent dairy sources of magnesium. Six ounces(170g) of non-fat chocolate yogurt contains 68mg of magnesium or approximately 16% of the DV. (39)

A 16-ounce-glass (488g) low-fat milk contains at least 53.7 mg of magnesium or 13 of the recommended daily intake. (40)

Dairy products are also rich in calcium, potassium, phosphorus, and selenium.  

12. Tofu

Tofu is a popular dish in most vegan and vegetarian diets as an excellent source of plant protein. It’s prepared from fermented soy milk, pressing the curds into solid blocks. 

A 100g serving of tofu provides at least 53% magnesium or 13% of the recommended intake. It may also contain over 10g of non-meat protein and over 10% of the DV for selenium, calcium, manganese, and iron. (41)

Tofu is the ideal source of magnesium for sleep among vegans and vegetarians.  

13. Dried Figs 

These teardrop-shaped fruits have been associated with good health and prosperity since ancient times. Dried figs provide the highest amount of magnesium within the fruit category. 

One cup of dried figs(140g) provides about 101.3mg of magnesium, which translates to nearly 24% of the recommended daily intake. They are also rich in dietary fiber, calcium, iron, phosphorus, and potassium. (42)

You can easily add figs to your diet as a healthy snack or tossed into your salad or sandwich for an added crunch. 

14. Hemp Seeds 

Hemp seeds are often touted as a superfood. The seeds have a rich nutritional profile, key among them a high concentration of magnesium. 

One ounce(28g) of hemp seeds provides 198.8mg of magnesium, approximately 47% of the DV. The small brown seeds are also rich in plant protein, fiber, vitamin E, phosphorus, riboflavin, and healthy fats. (43)

Although the seeds come from the Cannabis sativa plant, they do not have any mind-altering or psychotic effects. (44) You can add hemp seeds into your diet through smoothies, salads, or nut-seed trail mixes. 

15. Peanut Butter

Peanut butter is a firm favorite for many, providing a good amount of protein, healthy fats, and essential vitamins and minerals like magnesium. 

One ounce or two tablespoons of peanut butter provides approximately 57mg of magnesium, about 14% of the recommended dietary intake. Peanut butter is also rich in zinc, phosphorus, niacin, and vitamin B6. (45)

Magnesium Supplementation

Sadly, nearly half the adult population does not meet the recommended daily allowance for magnesium(41). Magnesium supplements are an excellent way to ensure you attain the recommended threshold aside from your meals.

You may need to speak to your physician to determine if you need to supplement your magnesium intake. Hypermagnesemia–a condition characterized by extremely high levels of magnesium in the bloodstream– can be a side effect of supplementation. You may experience diarrhea, vomiting, lethargy, muscle weakness, or low blood pressure. (46)

Additionally, magnesium supplements have the potential to interact with other medications you may be taking. Consulting your doctor allows you to avoid having averse effects from drug interactions. (47)

Fortunately, high magnesium levels from your diet don’t threaten your health, as the kidneys can easily eliminate the excess through urine. As such, you should aim to get the recommended daily intake from your meals. 

Related: Magnesium supplements

Wrapping Up

Magnesium is a vital electrolyte in the body, playing a role in hundreds of enzymatic reactions. A growing body of research points out the relationship between magnesium and a good night’s sleep. 

Eating foods rich in magnesium is an excellent way to ensure you attain the recommended daily intake. Incorporating the foods above in different meals during the day can help you maximize the DV. 

Additionally, you may consider using magnesium supplements to add to your dietary intake. Remember to consult your doctor first to avoid a possible case of magnesium overdose. 


John Davis