If you’ve ever stared at the ceiling overnight, you’ll know how much stress the stress of insomnia can bring. This makes it harder throughout the day, let alone stick to your health goals. Sure, a cup of coffee may get you forward, but there is another strategy that may help.
Magnesium, commonly known as a “relaxation mineral,” plays a role in calming your nervous system and helping you relax your body and mind.
Nearly half of Americans don’t have enough of this basic nutrient that puts them at risk of insomnia at night (3). If you are looking for better eyes closed, then magnesium may just be a lack of your sleeping puzzle.
Magnesium is an essential mineral for more than 300 reactions in the body (3). It plays a vital role in energy production, neurological function and muscle health. In addition to these general benefits, magnesium is particularly valuable for promoting tranquil sleep (1, 3, 5).
According to Daisy Mercer, a registered dietitian at MyFitnessPal, the study shows that about 48% of people of all ages in the United States consume less than recommended magnesium per day. This may affect sleep (3). Let’s dive into the sleep benefits of magnesium so you can determine if it’s right for you.
How magnesium makes sleep good
Magnesium is often called a “relaxation mineral” because it plays an important role in calming the body and mind (5).
Here are some ways to support better sleep:
May calm the nervous system
Magnesium promotes the activity of gamma-aminobutyric acid (GABA). That is a brain chemical that helps calm the mind and relax the body to prepare 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).
In addition, magnesium helps relieve stress by regulating the body’s stress response system. It reduces the release of stress hormones such as cortisol and supports a more balanced nervous system (6).
By calming your brain and minimizing stress through dual responsibilities, magnesium can play a role in helping you fall asleep (6).
Can reduce insomnia
Magnesium supports the production of melatonin, the hormone that controls the sleep cycle. Melatonin can help your body signal it’s time to take a break (2).
When magnesium levels are low, the production of melatonin may be disturbed, which may cause difficulties or fall asleep (2).
In addition to its role in making melatonin, the calming effect of magnesium makes it a potential tool for solving insomnia. One analysis found that supplementing magnesium helped people fall asleep for nearly 20 minutes (5).
Another small study in adults with poor sleep quality found that magnesium supplements improve sleep quality (7).
May help soothe uneasy leg syndrome (RLS)
Some people find magnesium helps manage uneasy leg syndrome (RLS). RLS is a characteristic of feeling uncomfortable on the legs and can disrupt sleep (2).
Some studies have found that magnesium may help reduce symptoms, especially when RLS is associated with magnesium deficiency (8). But unless you are insufficient, the evidence does not support the use of magnesium for magnesium cramps.
Magnesium may contribute to RLS when it binds to vitamin B6 (9). One study found that the combination helped improve RLS symptoms and sleep quality (9).
Types of magnesium
There are several common types of magnesium supplements, each with different properties. These are some of the more common forms.
- Magnesium citrate It is often used to aid constipation because it may have mild laxative effects (3).
- Magnesium glycineE is known for its calming properties and is often recommended for promoting sleep (10).
- Magnesium oxide Can be used as a laxative or relieve heartburn (3).
- Apple Magnesium Magnesium It is considered to be a very absorbable magnesium. Some people use it to relieve pain from fibromyalgia, although research does not support this use (12, 13).
- Magnesium chloride Can be found in the bath product. A study using a special form of oral magnesium chloride found that it helped a small group of people fall asleep faster (7).
- Magnesium l-Magnesium sulfate Its potential cognitive benefits are being investigated due to its ability to cross the blood-brain barrier (14).
Best sleep magnesium
Magnesium glycine is the first choice for helping sleep because it supports relaxation and calming the nervous system (10). The binding of magnesium to glycine may make it particularly useful for improving sleep quality and reducing insomnia (10).
Although no head-to-head studies have shown that magnesium glycine is the best sleep magnesium, I prefer it with other forms of magnesium because it is well tolerated and is unlikely to cause gastrointestinal side effects (10).
Magnesium dosage
Magnesium’s recommended dietary allowance (RDA) varies by age and gender, but adults vary from 310 to 420 mg per day (3).
For general health and sleep support, most experts recommend supplementing the range of 200-400 mg per day (3). However, contact your doctor before taking 350 mg or more of magnesium per day (3).
At the same time, there is no set time for sleeping magnesium in the day. The advantage is long-term use. You may need to start with a lower dose, especially if you are new to magnesium supplements to avoid potential digestive disorders (1). Likewise, since magnesium and calcium compete for absorption, it is best to avoid adding these two supplements together (1).
Source of food that may help with sleep
A variety of nutritious foods, including leafy greens, whole grains, nuts and seeds, are rich in magnesium (3).
“Some good examples are chia seeds, pumpkin seeds, almonds and spinach,” Mercer said. “These foods can be easily added to your daily routine to support enough magnesium levels for better sleep.”
Here are some other foods that can improve magnesium well (3):
- Tofu
- oatmeal
- potato
- Dark Chocolate
So sprinkle pumpkin seeds or almonds on your yogurt, or use them as a standalone snack. Add some spinach to your morning smoothie to boost your magnesium content.
Including magnesium-rich foods in your diet can help you meet your daily magnesium quota, which may translate into sleep benefits (3). You can use MyFitnessPal to track your food intake and make sure you are eating a variety of magnesium-enhanced foods, such as leafy greens and nuts every day.
About the Expert
Samantha Cassetty, MS, RD, Is a nationally recognized food and nutrition expert, media personality, nutrition consultant and author. Cassetty is a former nutrition director for good housekeeping and co-author of Sugar Shock.
RD Daisy Mercer, Is MyFitnessPal’s food data curator. She graduated from Colorado State University with a bachelor’s degree in food science and diet and completed her dietary internship through VA San Diego Healthcare System.
Emily Sullivan Is MyFitnessPal’s food data curator. She received her bachelor’s degree and completed her dietary internship at Ohio State University, and received her culinary arts degree from Johnson and the University of Wales.
Side effects of magnesium
While magnesium supplements are safe for most people, they can cause side effects, especially when taken at high doses (3).
The most common side effects include digestive problems such as diarrhea, nausea, or stomach cramps (3). These are often associated with certain types of magnesium, such as magnesium citrate or magnesium oxide, which have laxative effects (3).
Once, when I was at a business lunch, the theme of magnesium appeared. The person I dined with shared that she started taking magnesium, which was unbearable due to side effects. After discussing it, I learned that she was taking magnesium citrate, so I recommend switching to magnesium glycine. She later let me know that this simple exchange can solve the problem!
To minimize or avoid side effects, consider the following tips:
- Start with the smallest recommended dose and gradually increase if needed (3).
- Choose forms such as magnesium glycine or magnesium apple magnesium, which are more gentle on the gastrointestinal (GI) system (3).
- Unless otherwise recommended by healthcare providers, less than 350 mg per day (3).

You may also like
Improve sleep hygiene with MyFitnessPal’s sleep program
Other ways to improve sleep
While magnesium may play a role in promoting sleep, pairing it with other natural strategies and lifestyle adjustments may help (4).
Here are some ways to improve sleep:
- Stick to a consistent sleep schedule . Going to bed every day and waking up at the same time helps adjust the body’s internal clock, making it easier to fall asleep (4).
- Create a calm bedtime routine . Relaxative activities such as reading, gentle stretching and meditation can help your brain signal (4).
- Limit screen time before bedtime . The blue light emitted by the device can interfere with the production of melatonin (4). Try to set the device aside for at least an hour before going to bed (4). (Length is better.)
- Optimize your sleep environment . Keep the bedroom cool, dark and quiet (4).
- Include foods rich in melatonin in your diet. Foods such as sour cherries, kiwis and walnuts are natural sources of melatonin. Using these as part of a light sleepy snack may help promote lethargy (15).
- Avoid sleep disruptors. Reduce caffeine and alcohol intake during bedtime. Avoid preventing indigestion at night (4).
MyFitnessPal has useful sleep features that connect to your Apple Watch or other sleep tracking device. You can use it to get snapshots of your sleep and eating habits to make better sleep choices.
When used in conjunction with these practices, magnesium supplementation can supplement your efforts by supporting relaxation and reducing factors such as muscle tone or stress that may interfere with sleep (10). Together, these approaches create a comprehensive strategy for better rest.
FAQs (FAQs)
Which magnesium is best for sleep?
Due to the calming effects of glycine, it is often recommended to use magnesium glycine for sleep and is easier on the gastrointestinal system (10). However, other forms of magnesium have been studied and found to be helpful for sleep (7).
Is the content of magnesium citrate or glycine better?
Many people prefer magnesium glycine for insomnia because it is milder on your gastrointestinal system, but some studies have found that magnesium citrate can also help promote better sleep (10, 5).
Can I fall asleep with magnesium every night?
Yes, it’s safe to fall asleep every night, but consult a healthcare provider for personalized advice (1).
How much glycine should I sleep for?
Usually, it is common to take 200-400 mg of sleep time per night (3). However, if you take more than 350 mg, talk to your doctor, which is considered a safe upper limit for supplements (3).
Bottom line
Magnesium plays an important role in promoting sleep through the calm nervous system, supporting the production of melatonin and potentially reducing symptoms of insomnia or restless leg syndrome (10).
While you can take supplements to improve your sleep, you can also increase your magnesium intake by rich foods like leafy greens, nuts, seeds, and dark chocolate (3).
MyFitnessPal sleep feature integrates sleep data for the app you connect to and provides insights to help you pay attention to patterns in your diet that may affect sleep. Download the app now.
Does magnesium work during sleep? First appeared on the MyFitnessPal blog.