Does magnesium help you sleep? Sometimes, modestly. Pooled trials in older adults with insomnia found people fell asleep about 17 minutes faster on magnesium than placebo, but a 2026 review of 12 randomised trials rated the overall evidence low to very low and concluded magnesium is not supported as a routine treatment for insomnia. It is cheap and safe to try, not a reliable fix.
Magnesium has become the sleep supplement of the moment. Every second wellness video recommends magnesium glycinate before bed, and the shelves now carry powders, gummies, sprays and bath flakes. The research is a lot more lukewarm than the marketing, and the gap between them is worth understanding before you spend anything. Here is what the trials actually found, which form to pick if you do try it, how much to take, and when magnesium is the wrong answer to your sleep problem.
Magnesium and Sleep at a Glance

| What it is | An essential mineral involved in over 300 enzyme reactions, including the pathways that calm the nervous system |
| Evidence for sleep | Low to very low certainty. Small trials show modest benefit, larger reviews are inconsistent |
| Best form for sleep | Magnesium glycinate or citrate. Avoid oxide, which is poorly absorbed and mostly a laxative |
| Typical dose | 200 to 400 mg of elemental magnesium in the evening. The supplement upper limit is 350 mg a day |
| Main side effect | Loose stools and stomach cramps, especially with citrate, oxide and sulphate |
| Do not take if | You have kidney disease, without your doctor’s approval |
Why Magnesium Is Supposed to Help
The theory is sound, which is part of why the supplement took off. Magnesium binds to GABA receptors, the same calming system that sleeping tablets act on, and it blocks NMDA receptors, which carry the excitatory signals that keep your brain alert. It also plays a role in regulating melatonin and the daily cortisol rhythm, and low magnesium is associated with higher levels of stress hormones.
There is a second argument: a lot of people simply do not get enough. Magnesium sits in wholegrains, nuts, seeds and leafy greens, and dietary surveys repeatedly find large numbers of adults falling short of the recommended intake. If you are genuinely low, topping up may help your sleep the way fixing any deficiency helps. If your levels are already fine, extra magnesium has much less to work with, and that may be exactly why trial results are so inconsistent.
What the Research Actually Found

The encouraging result
A systematic review and meta-analysis published in BMC Complementary Medicine and Therapies pooled three randomised trials covering 151 older adults with insomnia. People taking magnesium fell asleep on average 17.36 minutes faster than those on placebo. Total sleep time improved by about 16 minutes, though that difference was not statistically significant.
The authors were careful, and so should we be. All three trials carried a moderate to high risk of bias, and the quality of evidence was rated low to very low. Their own summary said the literature is not good enough for doctors to make confident recommendations, while noting that magnesium is cheap and widely available, so trying it is reasonable.
The best known of those trials came from Iran in 2012, where 46 older adults took 500 mg of magnesium or placebo for eight weeks. The magnesium group improved on insomnia severity, sleep time and sleep efficiency, and had higher melatonin and lower cortisol in the morning. Forty six people is a small study, and no one has since repeated it at scale.
The 2026 review that complicates the story
This is the part that rarely makes it into supplement marketing. A 2026 systematic review in the Journal of Dietary Supplements searched the literature up to June 2026 and pulled together 12 randomised controlled trials of magnesium on its own for sleep, plus three more on cramp and movement related sleep problems. Results were inconsistent across every type of measurement used: questionnaires, EEG, research grade actigraphy, consumer wearables and blood markers. Certainty of evidence was again low to very low.
Their conclusion, in plain terms: current evidence does not support oral magnesium as a routine treatment for insomnia. It may give modest benefits on some subjective measures for some adults, but the findings do not hold together, and better trials are needed before anyone can recommend it confidently.
Where magnesium looks better
- Combined with melatonin and zinc. A double blind trial in Italian long term care residents found the three together improved sleep quality and next day alertness compared with placebo. That says something about the combination, not magnesium alone.
- Anxiety and stress. A systematic review in Nutrients found suggestive evidence that magnesium supplementation reduces subjective anxiety in people who are anxiety prone, while criticising the quality of the studies. If racing thoughts are what keep you awake, this may matter more than any direct sleep effect.
- Restless legs and night cramps. Evidence here is mixed too. A review in Sleep Medicine Reviews examined magnesium for restless legs syndrome and periodic limb movement disorder and found the studies too varied and too weak to draw firm conclusions, though it remains a common clinical suggestion.
Which Form of Magnesium for Sleep

Supplements are not pure magnesium. They are magnesium bound to something else, and that partner decides how much you absorb and what it does to your gut. Check the label for elemental magnesium, which is the number that counts.
| Form | Absorption | Best for | Watch out for |
|---|---|---|---|
| Glycinate | Good | Sleep and anxiety. Glycine itself is mildly calming | Bulky capsules, you may need two or three |
| Citrate | Good | Sleep if you also tend towards constipation | Loosens stools at higher doses |
| Malate | Good | Daytime use, muscle aches and fatigue | Some find it slightly stimulating at night |
| L-threonate | Good, crosses into the brain | Marketed for cognition and sleep | Expensive, low elemental content, thin evidence |
| Oxide | Poor | Constipation, not sleep | The cheapest and most common in budget products |
| Sulphate (Epsom salts) | Not meaningfully absorbed through skin | A relaxing bath | Do not count it as a dose |
For sleep, glycinate is the sensible default and citrate the cheaper alternative. If a cheap bottle just says “magnesium 500 mg” with no form named, it is almost certainly oxide, and you will absorb a small fraction of it.
How Much to Take, and When
- Dose: most sleep trials used between 200 and 500 mg of elemental magnesium. Starting at 200 mg is sensible. Note that health authorities set the upper limit for supplemental magnesium at 350 mg a day for adults, separate from what you get in food, because higher amounts cause diarrhoea.
- Timing: 30 to 60 minutes before bed. There is no trial proving this beats morning dosing, but it fits the routine and the calming effect people report.
- With food: reduces the chance of stomach upset.
- Give it two to four weeks. The trials ran for three to eight weeks. A single night tells you nothing except whether it upsets your stomach.
- Split larger doses. Two smaller doses are absorbed better and are gentler on the gut than one big one.
Get It From Food First

Food magnesium comes with fibre, potassium and B vitamins, costs nothing extra, and cannot be overdone. Rough amounts per serving:
- Pumpkin seeds, 30 g: about 150 mg
- Chia seeds, 30 g: about 110 mg
- Almonds, 30 g: about 80 mg
- Cooked spinach, half a cup: about 78 mg
- Dark chocolate, 70 per cent or higher, 30 g: about 65 mg
- Black beans, half a cup: about 60 mg
- Cooked quinoa, half a cup: about 60 mg

Adult requirements sit at roughly 310 to 320 mg a day for women and 400 to 420 mg for men. Two of the servings above plus normal meals gets most people there without a bottle.
What About Epsom Salt Baths and Magnesium Sprays?

Magnesium sulphate in bathwater and magnesium oils sprayed on skin are sold on the idea that you absorb the mineral through your skin. Good evidence for that is missing, and skin is specifically designed to keep charged mineral ions out.
That does not make the bath pointless. A warm bath an hour or two before bed helps you fall asleep through a different and well understood route: your body temperature rises, then drops sharply as you get out, and that drop is one of the signals that triggers sleep. Enjoy the bath, and do not count it towards your magnesium intake.
Side Effects and Who Should Avoid It
- Loose stools, cramps and nausea are the common complaints, and they are dose related. Citrate, oxide and sulphate are the worst offenders, glycinate the gentlest.
- Kidney disease is the important one. Your kidneys clear excess magnesium. If they are not working well, supplements can build up to dangerous levels, so do not take magnesium without your doctor’s approval.
- Medication timing. Magnesium reduces absorption of some antibiotics, including tetracyclines and quinolones, and of bisphosphonates and levothyroxine. Separate them by at least two hours, four for bisphosphonates, and check with a pharmacist.
- Heart and blood pressure medication. Talk to your doctor first if you take diuretics, digoxin or medication for heart rhythm problems.
- Pregnancy. Dietary magnesium is important and safe. Supplements should be cleared with your midwife or doctor rather than started on your own.
- Blood tests are not much help. Only about 1 per cent of body magnesium is in the blood, so a normal serum result does not rule out low stores.
When Magnesium Is the Wrong Answer
Worth being blunt here, because a supplement is an easy thing to reach for when the real problem is elsewhere. Magnesium will not fix sleep that is being wrecked by caffeine after lunch, alcohol in the evening, a wildly irregular bedtime, a bedroom that is too warm, or a phone in your hand at midnight. It will not touch sleep apnoea, which needs diagnosis and treatment, and it is no substitute for cognitive behavioural therapy for insomnia, which remains the first line treatment with the best evidence by a wide margin.
See your doctor if you have been sleeping badly for more than three or four weeks, if you snore heavily or stop breathing in your sleep, if you are exhausted all day despite enough hours in bed, or if low mood or anxiety is driving the sleeplessness. Our guide to natural remedies for insomnia covers the habit changes that do the heavy lifting.
Frequently Asked Questions
Does magnesium actually help you sleep?
Modestly, and not reliably. Pooled trials in older adults found people fell asleep about 17 minutes faster, but a 2026 review of 12 randomised trials found inconsistent results and rated the evidence low to very low. Some people notice a real difference, many notice nothing.
Which magnesium is best for sleep, glycinate or citrate?
Glycinate for most people. It is well absorbed, gentle on the stomach, and the glycine it is bound to is mildly calming in its own right. Citrate is also well absorbed and cheaper, and it is the better pick if you tend towards constipation, but it loosens stools at higher doses.
How much magnesium should I take for sleep?
Trials used 200 to 500 mg of elemental magnesium. Start at 200 mg in the evening. Keep supplemental magnesium at or below 350 mg a day unless a doctor advises otherwise, since that is the upper limit set to avoid diarrhoea.
How long before bed should I take magnesium?
About 30 to 60 minutes, with food or a snack. No trial has compared timings directly, so this is practical convention rather than proven science.
Can you take magnesium every night?
Yes, for most healthy adults at sensible doses. Trials ran for up to eight weeks without significant problems. If you develop loose stools, reduce the dose or switch to glycinate. Anyone with kidney disease needs medical advice first.
Can magnesium keep you awake?
It is uncommon, but some people report feeling more alert on magnesium malate, and any form can disturb the night if it upsets your stomach. If that happens, move the dose to the morning or change form.
Does magnesium help with anxiety at bedtime?
Possibly. A review in Nutrients found suggestive evidence that magnesium reduces subjective anxiety in anxiety prone people, while noting the studies were of poor quality. If anxious thoughts are what keep you awake, pairing it with lemon balm or chamomile is a reasonable, low risk combination.
Do Epsom salt baths give you magnesium?
There is no good evidence that meaningful amounts pass through skin. The bath still helps you sleep, because the rise and then fall in body temperature afterwards is a genuine sleep trigger.
More Sleep and Calm Remedies
- Natural Remedies for Insomnia, the habit changes that matter most
- Lemon Balm Tea Benefits, for the anxious thoughts that delay sleep
- Chamomile Tea Benefits, the classic bedtime cup and what the trials show
- Peppermint Tea Benefits, better suited to daytime than bedtime
- Browse all lifestyle and wellness guides
This article is for educational purposes only and is not medical advice. Do not take magnesium supplements if you have kidney disease unless your doctor approves, and check with a pharmacist if you take antibiotics, bisphosphonates, levothyroxine, diuretics or heart medication. Persistent insomnia deserves proper assessment rather than a supplement. See our medical disclaimer.
Images by Polina, Hanna Pad, Supplements On Demand, Vural Yavas, Aleksander Dumala and Tara Winstead via Pexels (free licence).
