If you’ve ever spent the night staring at the ceiling, you know how possible stressful insomnia is. It’s not only hard to get through the day, but it goes without saying that you stick to your health goals. Certainly, a cup of coffee may move you, but there is another strategy that may help.
Magnesium, often referred to as “relaxation minerals,” plays a role in calming your nervous system and helping you relax.
Almost half of Americans are at risk of sleepless nights because they don’t get enough of this essential nutrient (3). If you’re looking for a better closed eye, magnesium may be a missing piece of your sleep puzzle.
Magnesium is an essential mineral that is involved in over 300 reactions in the body (3). It plays an important role in energy production, neurological function and muscle health. Beyond these general benefits, magnesium is especially valuable for promoting a restful sleep (1, 3, 5).
According to Daisy Mercer, a registered dietitian at Myfitnesspal, the study shows that around 48% of people of all ages in the United States consume less than the recommended amount of magnesium every day. And it can affect your sleep (3). Let’s dive into the benefits of magnesium for sleep. This will allow you to decide whether it’s right for you.
How magnesium benefits sleep
Magnesium is often referred to as a “relaxation mineral” because it plays an important role in calming the body and mind (5).
Here are some ways that it works to support better sleep:
It may calm the nervous system
Magnesium promotes the activity of gamma aminobutyric acid (GABA). It is a brain chemical that helps keep the mind quiet and relax the body in preparation for sleep (relax the body in preparation for sleep)5). Low levels of GABA are associated with anxiety and sleep disorders, so the effects of magnesium on this neurotransmitter may be helpful (6).
Additionally, magnesium helps reduce stress by regulating the body’s stress response system. Reduces the release of stress hormones like cortisol and supports a more balanced nervous system6).
By calming the brain and minimizing stress, magnesium can play a role in helping you sleep (6).
It can reduce insomnia
Magnesium supports the production of melatonin, a hormone that regulates the sleep-wake cycle. And melatonin helps signal that it’s time to rest in your body (2).
Low levels of magnesium can destroy melatonin production, potentially reducing difficulties or continuing to sleep (2).
In addition to its role in the production of melatonin, the calming effect of magnesium makes it a potential tool for dealing with insomnia. One analysis found that magnesium supplementation helped people fall asleep almost 20 minutes faster (5).
Another small study of adults with poor sleep quality found that magnesium supplements can improve sleep quality (7).
It may help calm your restless leg syndrome (RLS)
Some people find magnesium useful in managing restless leg syndrome (RLS). RLS is a condition characterized by unpleasant sensations in the legs, which can disrupt sleep (2).
Several studies have found that magnesium may help relieve symptoms, especially when RLS is associated with magnesium deficiency (8). But Emily Sullivan, a registered dietitian at Myfitnesspal, says he doesn’t support using magnesium for muscle cramps unless you’re short on it.
Magnesium may be useful when RLS is combined with vitamin B6 (9). One study found that this combo can help improve RLS symptoms and sleep quality (9).
Types of magnesium
There are several common types of magnesium supplements, each with different properties. Some of the more general forms are listed below.
- Magnesium citrate It is often used to aid constipation as it may have mild laxative effects (3).
- Magnesium glycine nutE is known for its calming properties and is often recommended to promote sleep (10).
- Magnesium oxide Can be used to relieve laxatives or heartburn (3).
- Magnesium magnesate It is considered to be a highly absorbent form of magnesium. Some people use it to relieve the pain of fibromyalgia, but studies do not support this use (12, 13).
- Magnesium chloride It may be included in bath products. One study using special forms of oral chloride found that small groups of people helped fall asleep faster (7).
- Magnesium L-Treonic Acid It is being studied for potential cognitive benefits due to its ability to overcome blood-brain barriers.14).
Magnesium is the perfect place to sleep
Magnesium glyctinate is the greatest option to support sleep because of its ability to support relaxation and calm the nervous system (10). The combination of magnesium and glycine may be particularly useful in improving sleep quality and reducing insomnia (10).
There are no head-to-head studies suggesting that magnesium glycinate is the best magnesium for sleep, but I prefer it over other forms of magnesium as it is tolerated and unlikely to cause side effects of the gastrointestinal tract (I prefer it)10).
Magnesium dosage
The recommended dietary allowance (RDA) for magnesium varies depending on age and gender, but for adults it ranges from 310 to 420 mg per day.3).
For general health and sleep support, most experts suggest supplementing in the range of 200-400 mg per day (3). However, check with your doctor before taking magnesium at least 350 mg per day (3).
On the other hand, there is no time to take magnesium for sleep. The benefits come with long-term use. Especially if you’re new to magnesium supplements, you may want to start with a lower dose to avoid digestive upset (1). Also, magnesium and calcium compete for absorption, so it is best to avoid taking these two supplements together.1).
Food sources that may help you sleep
A variety of nutritious foods such as lush greenery, whole grains, nuts, seeds and more packed with magnesium (3).
“Good examples include chia seeds, pumpkin seeds, almonds and spinach,” says Mercer. “These foods can be easily added to your routine to support a better sleep, as they support proper magnesium levels.”
Other foods that offer a great boost in magnesium include:3):
- Tofu
- oatmeal
- Potatoes
- Dark Chocolate
So sprinkle pumpkin seeds or almonds on top of yogurt or have them as a standalone snack. Add spinach to your morning smoothie to increase the magnesium content.
Including magnesium-rich foods in your diet can help you meet your daily magnesium quota.3). Can be used myfitnesspal Track your food intake and make sure you eat a variety of magnesium-fortified foods, including lush greenery and nuts each day.
About the experts
Samantha Cassetti, MS, RD, He is a nationally recognized food and nutrition expert, media personality, nutrition consultant and author. Cassetty is former nutrition director at Good Housekeeping and co-author of Sugar Shock.
Daisy Mercer, RD, I am the food data curator for MyFitnessPal. She holds a bachelor’s degree in food science and nutrition from Colorado State University and completed a nutrition internship with the VA San Diego Healthcare System.
Emily Sullivan, Lord I am the food data curator for MyFitnessPal. She earned her bachelor’s degree, completed a diet internship at Ohio State University, and a culinary degree from Johnson University and the University of Wales.
Side effects of magnesium
Magnesium supplements are safe for most people, but can cause side effects, especially when taken at high doses (3).
The most common side effects include digestive problems such as diarrhea, nausea, and stomach cramps (3). These are often associated with certain types of magnesium, such as magnesium citrate and magnesium oxide.3).
One day I was at a business lunch and the subject of magnesium came up. The person I was eating shared that she started taking magnesium and couldn’t do it while plaguing her stomach due to side effects. After discussing that, I learned that she was taking magnesium citrate, so I suggested switching to magnesium glyctinate. She later told me that this simple swap did the trick!
Consider these tips to minimize or avoid side effects.
- Start with the smallest recommended dosage and gradually increase as needed (3).
- Select mild glycinate or magnesium-like forms in the Gastrointestinal (GI) system (GI)3).
- Stick to below 350 mg per day unless advised by a healthcare provider (3).

You might like it too
Improve your sleep hygiene with myfitnesspal sleep plans
Other ways to improve your sleep
Magnesium may play a role in promoting sleep, but combining it with other natural strategies and lifestyle adjustments is helpful (4).
There are several more ways to improve your sleep:
- Stick to a consistent sleep schedule . If you go to bed every day and wake up at the same time, you will adjust your internal clock and become more likely to fall asleep (4).
- Create a calm bedtime routine . Relaxing activities like reading, gentle stretching, and meditation can help show that it’s time to swell into the brain (4).
- Limit screen time before bed . The blue light emitted by the device can interfere with the production of melatonin (4). Try setting your device aside at least an hour before going to bed (4). (Longer the more is better.)
- Optimize your sleep environment . Keeps your bedroom cool, dark and quiet (4).
- Include melatonin-rich foods in your diet. Foods such as tart cherries, kiwi and walnuts are the natural sources of melatonin. Including these as part of a light bedtime snack may help promote sleepiness (15).
- Avoid sleep tows. Reduce caffeine and alcohol intake until bedtime. Avoid heavy dinners and late-night snacks to prevent nighttime indigestion (4).
MyFitnessPal has a useful sleep feature that connects to your Apple Watch or other sleep tracking devices. You can use it to take snapshots of your sleep and eating habits and make choices to support better sleep.
Combined with these practices, magnesium supplementation can complement your efforts by reducing factors such as muscle tension and stress that can interfere with sleep (which can interfere with sleep).10). Together, these approaches create a balanced strategy for better rest.
Frequently asked questions (FAQ)
What type of magnesium is best for sleep?
Due to the calming effect of glycine, magnesium glycinate is often recommended for sleep and is easy in the GI system (10). However, other forms of magnesium have been studied and have been found to be useful for sleep (7).
Is Magnesium Citrate or Glycinate better for insomnia?
Many people prefer glycinates over insomnia due to their mild GI system, but magnesium citrate has also been found to help promote better sleep (10, 5).
Is it okay to take magnesium every night to sleep?
Yes, it is generally safe to take magnesium every night to sleep, but talk to your healthcare provider for personalized advice.1).
Conclusion
Magnesium plays an important role in promoting sleep by calming the nervous system, supporting melatonin production, and potentially reducing symptoms of insomnia or restless leg syndrome (10).
You can also take supplements to improve your sleep, but you can also increase your magnesium intake through nutrient-rich foods such as lush greens, nuts, seeds and dark chocolate.3).
The MyFitnessPal Sleep feature integrates sleep data from connected apps and provides insights to help you notice dietary patterns that can affect your sleep. Download the app now.
Does magnesium work for sleep? It first appeared on the MyFitnessPal blog.