Magnesium has become one of the most talked-about natural sleep aids, with social media full of “sleepy girl mocktails” and claims that it’s the answer to insomnia. But does it actually work? And if you try it, which type should you take, how much, and when? This guide explains everything you need to know about magnesium for sleep.
This guide looks at what the research really shows, compares the main forms of magnesium, and explains who is most likely to benefit, plus the safety limits you need to know.
Key takeaways
- Magnesium helps regulate the nervous system, muscle relaxation and sleep hormones, and many people don’t get enough from food.
- In a 2021 meta-analysis, magnesium helped older adults with insomnia fall asleep about 17 minutes faster, but the evidence quality was low.
- It’s most likely to help if you’re low in magnesium: common with poor diets, heavy alcohol use, some medications and gut conditions.
- Magnesium glycinate is the most popular choice for sleep because it’s well absorbed and gentle on the stomach, though direct comparisons between forms are lacking.
- The safe upper limit from supplements is 350 mg a day for adults unless your doctor advises more.
How does magnesium affect sleep?
Magnesium is a mineral needed for more than 300 biochemical reactions in your body. Several of them are linked to sleep and relaxation:
- Calming the nervous system. Magnesium supports GABA, the main “calming” chemical messenger in the brain.
- Relaxing muscles. It helps muscles relax after contracting, which may reduce cramps and restlessness at night.
- Regulating stress hormones. Low magnesium has been linked to a more active stress response.
- Supporting melatonin. Magnesium plays a role in the body’s internal clock.
A review of magnesium for insomnia explains that older adults are at higher risk of magnesium deficiency, which may alter sleep structure and contribute to insomnia symptoms.
What does the research say?
The evidence is promising but limited.
The most cited review is a 2021 systematic review and meta-analysis in BMC Complementary Medicine and Therapies. It found that in older adults with insomnia, magnesium supplements helped people fall asleep about 17 minutes faster than a placebo. Total sleep time improved by about 16 minutes, but that result wasn’t statistically significant.
However, the review included only three small trials with 151 people, and the authors judged the evidence quality as low. They concluded the research wasn’t strong enough for doctors to make firm recommendations.
What this means for you: magnesium isn’t a powerful sleeping pill, but it’s low-risk and may help, especially if your levels are low or you have trouble winding down. It works best as part of good sleep habits, not as a replacement for them.
Are you low in magnesium?
The recommended daily amount for adult women is 310 to 320 mg, and the National Institutes of Health notes that many people in the US get less than this from their diet.
You may be more likely to be low if you:
- Eat few whole grains, nuts, seeds, beans and leafy greens.
- Drink alcohol regularly.
- Have type 2 diabetes, celiac disease or Crohn’s disease.
- Take certain medications long term, such as proton pump inhibitors (for reflux) or some diuretics.
- Are older, as absorption decreases with age.
Early deficiency often has no obvious symptoms. More significant deficiency can cause loss of appetite, nausea, fatigue and weakness, and severe deficiency can cause tingling, muscle cramps and abnormal heart rhythms.
Testing is tricky: most magnesium is stored inside cells and bones, so a standard blood test doesn’t accurately reflect your total body levels.

Which type of magnesium is best for sleep?
Supplements come in many forms. They differ in how well they’re absorbed and how likely they are to upset your stomach. The NIH notes that forms like magnesium aspartate, citrate, lactate and chloride are absorbed more easily than others.
There are very few studies directly comparing forms for sleep, so this table is based on absorption and tolerability rather than proven sleep effects.
| Form | Absorption | Stomach side effects | Best for | Notes |
|---|---|---|---|---|
| Magnesium glycinate (bisglycinate) | Good | Low | Sleep, anxiety, people with sensitive stomachs | Most popular choice for sleep; glycine itself may support sleep |
| Magnesium citrate | Good | Moderate (can loosen stools) | General top-up; constipation | Can help if you’re also constipated |
| Magnesium L-threonate | Good | Low | Brain and memory claims | More expensive; human sleep evidence is limited |
| Magnesium chloride | Good | Moderate | General top-up | Also used in topical sprays (absorption through skin is unproven) |
| Magnesium oxide | Poor | Higher (laxative effect) | Constipation, heartburn | Cheap and common, but less ideal for raising levels |
| Magnesium sulfate (Epsom salt) | Not meant to be swallowed for sleep | N/A | Relaxing baths | Bath absorption is minimal, but a warm bath can still help you unwind |
Our pick for most women: magnesium glycinate, because it’s well absorbed and least likely to cause digestive upset. If you also struggle with constipation, magnesium citrate can do double duty.
How much magnesium should you take for sleep?
Most sleep studies have used between about 250 and 500 mg of elemental magnesium a day. However, the tolerable upper limit for adults is 350 mg a day from supplements and medicines. This limit doesn’t include magnesium from food, which is safe.
A sensible approach:
- Start with 100 to 200 mg of elemental magnesium.
- Increase gradually if needed, staying at or below 350 mg unless your doctor recommends otherwise.
- Check the label for elemental magnesium, not just the total compound weight. For example, 1,000 mg of magnesium glycinate may contain only about 140 mg of elemental magnesium.
When should you take magnesium for sleep?
Take it 30 to 60 minutes before bed. Some people prefer to split the dose between the evening meal and bedtime. Taking it with food can reduce stomach upset.
Give it at least 2 to 4 weeks of consistent use before deciding whether it helps.
Get more magnesium from food
Food is the safest way to boost your intake. Pumpkin seeds are one of the richest sources, with about 156 mg per ounce.
| Food | Serving | Approximate magnesium |
|---|---|---|
| Pumpkin seeds | 1 oz (28 g) | 156 mg |
| Chia seeds | 1 oz (28 g) | 111 mg |
| Almonds | 1 oz (28 g) | 80 mg |
| Spinach, cooked | ½ cup | 78 mg |
| Cashews | 1 oz (28 g) | 74 mg |
| Black beans, cooked | ½ cup | 60 mg |
| Edamame | ½ cup | 50 mg |
| Dark chocolate (70% to 85%) | 1 oz (28 g) | 65 mg |
| Avocado | 1 medium | 58 mg |
| Brown rice, cooked | ½ cup | 42 mg |
A relaxing evening snack that adds magnesium could be a handful of almonds and a small square of dark chocolate, or yogurt with chia and pumpkin seeds.
Side effects and safety
Magnesium from food is safe. Supplements are generally safe at recommended doses but can cause:
- Diarrhea, nausea and stomach cramps (more common with oxide and citrate).
- Very high doses can cause dangerous magnesium levels, especially in people with kidney problems, leading to low blood pressure, muscle weakness and irregular heartbeat.
Talk to your doctor before taking magnesium if you:
- Have kidney disease.
- Take antibiotics (tetracyclines or quinolones), osteoporosis drugs (bisphosphonates), thyroid medicine or diuretics, as magnesium can interfere with absorption. These usually need to be taken a few hours apart.
- Are pregnant or breastfeeding.
- Have a heart condition.
Other ways to sleep better
Magnesium works best alongside good sleep habits:
- Keep a regular bedtime and wake time, even on weekends.
- Keep your bedroom cool, dark and quiet.
- Avoid caffeine after early afternoon and limit alcohol, which disrupts deep sleep.
- Put screens away 30 to 60 minutes before bed.
- Get morning daylight to set your body clock.
- If you can’t sleep after 20 minutes, get up and do something calm until you feel sleepy.
- For long-term insomnia, cognitive behavioral therapy for insomnia (CBT-I) is the recommended first-line treatment.
If you’re comparing products, see our sleep and stress supplement reviews, assessed with our 11-point review method.
When to see a doctor
See your doctor if:
- You’ve had trouble sleeping at least 3 nights a week for 3 months or more.
- You snore loudly, gasp or stop breathing during sleep (possible sleep apnea).
- You feel very sleepy during the day despite enough time in bed.
- Your sleep problems are linked to low mood, anxiety, night sweats or pain.
Frequently asked questions
Does magnesium really help you sleep?
It may, especially if you’re low in magnesium. Research shows a modest benefit, helping people fall asleep about 17 minutes faster in one review, but the studies are small. It’s a gentle aid, not a sedative.
What’s the difference between magnesium glycinate and citrate for sleep?
Both are well absorbed. Glycinate is gentler on the stomach and is most often recommended for sleep. Citrate has a mild laxative effect, which can be helpful if you’re also constipated but annoying if you’re not.
Can I take magnesium every night?
Yes, most adults can take magnesium daily within the recommended limit. If you have kidney disease or take certain medications, check with your doctor first.
How long does it take for magnesium to work for sleep?
Some people notice they feel more relaxed within a few days, but give it 2 to 4 weeks of consistent use to judge.
Can magnesium help with menopause sleep problems?
It may help with relaxation and muscle cramps, but it doesn’t treat night sweats directly. If hot flashes are waking you up, talk to your doctor about treatments that target them. Read more in our guide to menopause and perimenopause.
The bottom line
Magnesium plays a real role in relaxation and sleep, and many women don’t get enough. Research suggests it may help you fall asleep a little faster, especially if you’re low, though the evidence is still limited. Magnesium glycinate is a good first choice, taken 30 to 60 minutes before bed, starting at 100 to 200 mg and staying within the 350 mg daily supplement limit.
Combine it with magnesium-rich foods and solid sleep habits for the best results, and see your doctor if insomnia is persistent. Explore more in our sleep guides.