MagnesiumMelatoninRest Recovery

Magnesium and Melatonin for Sleep: What the Evidence Shows

· · 17 min read
Magnesium and Melatonin for Sleep: What the Evidence Shows
📋 Quick Answer
Melatonin and magnesium act on sleep in different ways. Melatonin is a hormone that signals timing to the body clock; in a meta-analysis of trials in people with primary sleep disorders it modestly shortened the time to fall asleep and slightly improved sleep quality.1 Magnesium is a mineral that has been tested for sleep in only a few small, short trials, with mixed results.2,3,4 The evidence does not show that magnesium works better than melatonin, and neither is a substitute for medical care if sleep problems continue.

Melatonin is widely used as a sleep supplement. When the clinical trial data are examined rather than the marketing, melatonin is a modestly effective option, and its clearest evidence is for circadian rhythm problems rather than for sleep problems in general.1,5

Many common sleep complaints, such as difficulty falling asleep because of a racing mind, waking at 3am, or sleeping eight hours and waking tired, have several possible causes, including stress, alcohol, sleep apnea and depression. Persistent sleep problems are worth discussing with a clinician. We did not find evidence that magnesium reliably treats any of these problems.

What Melatonin Actually Does (And Doesn't Do)

Melatonin is a hormone produced by the pineal gland in response to darkness. Its biological function is to signal to the brain and body that it's nighttime — to shift your circadian clock. Melatonin is best understood as a timing signal rather than a classic sedative, although trials show it can modestly shorten the time to fall asleep.1

Melatonin does not work in the same way as benzodiazepines or alcohol, which act on GABA receptors. In a pooled analysis of 19 trials in people with primary sleep disorders, melatonin shortened the time to fall asleep by about 7 minutes, added about 8 minutes of sleep and gave a small improvement in overall sleep quality.1 In a small trial in adults over 50 who slept normally (15 people), none of the melatonin doses tested changed their sleep.6

🔬
Pooled analysis of 19 trials (1,683 people with primary sleep disorders): melatonin shortened the time to fall asleep by about 7 minutes and increased total sleep time by about 8 minutes, with a small improvement in sleep quality — modest effects
Ferracioli-Oda E, et al. PLOS ONE. 2013;8(5):e63773.  ·  PubMed ↗

Seven minutes was the average benefit for time to fall asleep, and the participants had diagnosed primary sleep disorders. The same analysis found larger effects on sleep latency and total sleep time in trials with longer duration and higher doses.1 Melatonin has the clearest guideline support for delayed sleep phase disorder and, in blind adults, non-24-hour rhythm disorder.5 The American Academy of Sleep Medicine suggests that clinicians not use melatonin for sleep-onset or sleep-maintenance insomnia in adults (a weak recommendation).7

🔬 The Neuroscience Behind Bad Sleep

What Is Known About Magnesium, GABA and Sleep

GABA (gamma-aminobutyric acid) is the brain's main inhibitory neurotransmitter, and many prescription sleep medicines act on GABA receptors. Whether everyday sleep problems are mainly caused by too little GABA activity has not been established, and we did not find studies showing that low magnesium reduces GABA activity enough to cause insomnia.

Magnesium takes part in nerve signalling, and the background section of one sleep trial describes it as a natural NMDA antagonist and GABA agonist, without presenting data on that point.2 We did not find studies showing that magnesium supplements act on GABA-A receptors in the way prescription sleep medicines (benzodiazepines, Z-drugs) do, so that link remains a hypothesis. Magnesium is not a substitute for prescription sleep medicine. Do not stop or change a prescribed medicine without talking to your prescriber.

Melatonin acts mainly as a timing signal. Which of the two, if either, helps a particular person depends on what is causing the sleep problem, which is best worked out with a clinician.

What the Evidence Shows for Magnesium and Sleep

Magnesium is involved in many enzymatic reactions in the body. Intake from food is often below recommended levels: in US survey data for 2005–2006, 48% of the population consumed less than the required amount of magnesium from food, not counting supplements.8 Low intake is not the same as clinical deficiency.

One small trial in older adults with insomnia measured cortisol, and serum cortisol was lower in the magnesium group than in the placebo group.2 It has not been established that magnesium lowers cortisol in the evening or that cortisol explains poor sleep.

🔬
Small trial in 46 older adults with insomnia: 500 mg of magnesium daily for 8 weeks improved several questionnaire-based sleep measures and blood markers (including melatonin and cortisol) compared with placebo. Early morning awakening did not reach significance (P = 0.08) and total sleep time did not differ (P = 0.37)
Abbasi B, et al. Journal of Research in Medical Sciences. 2012;17(12):1161–9.  ·  PubMed ↗

In this trial, blood melatonin was higher in the magnesium group than in the placebo group (P = 0.007).2 Sleep was measured with questionnaires and sleep logs, the trial was small and short, and, according to the trial report's full text, the magnesium was given as magnesium oxide rather than glycinate. This is early evidence only. It does not show that people in the trial had a melatonin deficiency or that magnesium corrects one.

How Do the Magnesium Forms Compare?

Magnesium supplements come in several forms. Studies that compare forms for sleep are lacking, so the table below only lists what we found for each form.

Form Absorption Sleep Effect Side Effect
Magnesium Glycinate Not compared with other forms in the studies we reviewed Tested in one 4-week trial in 155 adults with poor sleep: modest reduction in insomnia severity compared with placebo (small effect)4 Loose stools and diarrhea are the main limiting side effect of supplemental magnesium in general9
Magnesium Oxide Not reviewed here Used in the 8-week trial in older adults described above2 Widely used as a laxative10
Magnesium Citrate Not reviewed here Tested in one 7-week trial (320 mg/day) in adults over 51 with poor sleep: sleep quality scores improved in both the magnesium and the placebo groups3 Can loosen stools at higher doses
Magnesium L-Threonate Not reviewed here Not reviewed here Not reviewed here
Magnesium Malate Not reviewed here Not reviewed here Not reviewed here

Magnesium glycinate (also called bisglycinate) is magnesium bound to the amino acid glycine. One 4-week randomized trial of magnesium bisglycinate (250 mg of elemental magnesium daily) in 155 adults with self-reported poor sleep found a modest reduction in insomnia severity compared with placebo; the effect size was small (Cohen's d = 0.2).4 We did not find trials comparing glycinate with other forms for sleep, so it is not established that it works better than other forms.

Melatonin vs. Magnesium: Head to Head

Metric Melatonin Magnesium Glycinate
Primary mechanism Shifts circadian clock Not established; hypotheses include effects on nerve signalling and cortisol
Sleep onset About 7 minutes shorter in a meta-analysis of people with sleep disorders1 About 17 minutes shorter in a meta-analysis of 3 small trials in older adults; low to very low quality evidence11
Sleep quality Small improvement in overall sleep quality in people with sleep disorders1 Questionnaire-based measures improved in small trials; we found no magnesium trial that measured deep (slow-wave) sleep2,4
Nighttime awakenings Not clearly established in the studies we reviewed Early morning awakening did not reach significance in one trial (P = 0.08)2
Cortisol Not reviewed here Lower serum cortisol in one small trial; not established as the reason for any sleep benefit2
Natural melatonin production We did not find human studies showing that melatonin supplements suppress natural production Blood melatonin was higher in the magnesium group in one small trial2
Nutrient status A hormone, not a nutrient Low intake is common,8 but the trials did not select people for deficiency, and in one trial sleep improved on placebo as well3
Best evidence for Delayed sleep phase disorder and, in blind adults, non-24-hour rhythm disorder (AASM guideline)5 Not established; small trials in older adults with insomnia and in adults reporting poor sleep2,3,4
⚠️
Melatonin dose, quality and safety: In one trial in adults over 50, a 0.3 mg dose restored sleep efficiency in people with low sleep efficiency, while 3 mg kept blood melatonin elevated into daylight hours and lowered body temperature.6 In a systematic review of controlled studies, side effects were generally minor and short-lived, most often fatigue, mood changes, or effects on psychomotor and neurocognitive performance; a few studies noted blood-pressure effects and possible interactions with blood-pressure medicines.12 Product strength also varies: in an analysis of 31 supplements, measured melatonin ranged from 83% below to 478% above the labelled amount.13 Do not drive or operate machinery until you know how a melatonin or sleep product affects you. Ask your pharmacist or doctor before using melatonin if you take prescription medicines, are pregnant or breastfeeding, or are considering it for a child. Long-term safety is not settled: an observational study presented in 2025 reported a heart-failure signal in long-term users, and a later analysis concluded that observational data neither establish harm nor safety.14

Products Mentioned in This Article

Results of magnesium trials for sleep are modest and mixed, and the trials ran for 4 to 8 weeks.2,3,4 Sleep problems have many causes. The Kasivit products below are listed for reference; we did not review evidence that taking them together improves sleep, and the evidence for each is limited.

⚡
Magnesium Glycinate
Magnesium
A magnesium supplement. Sleep trials of magnesium are small and short (see above). The US upper limit for supplemental magnesium in adults is 350 mg a day, set because larger amounts commonly cause diarrhea, so add up the magnesium from every product you take.9 Ask your doctor first if you have kidney disease or take prescription medicines.
275mg · 3 capsules · Evening
🌿
Ashwagandha KSM-66
Ashwagandha
KSM-66 is a branded ashwagandha root extract. We did not review evidence for ashwagandha and sleep. Ashwagandha is not suitable for everyone: rare cases of liver injury have been reported, typically after weeks of use, with jaundice, itching and nausea.15,16 Stop use and seek medical advice if you notice yellowing of the skin or eyes. Ask a clinician before using it if you have liver or thyroid problems, take prescription medicines, or are pregnant or breastfeeding.
1 capsule · Morning or evening
🌙
VitaNight Sleep Formula
Sleep formula
Contains melatonin 2 mg per two-capsule serving (1 mg per capsule), with valerian, chamomile, GABA, L-tryptophan, lemon balm and passion flower. Melatonin and the herbal ingredients can cause daytime drowsiness; do not drive until you know how it affects you. Ask your pharmacist or doctor first if you take prescription medicines, are pregnant or breastfeeding, or are considering it for a child.
2 capsules · 30–60 min before bed
📊
The Kasivit Dusk Bundle
All Three
All three products — Magnesium Glycinate, Ashwagandha, and VitaNight — bundled at a lower price than buying the products separately. Check the labels for the amounts of magnesium, melatonin and other ingredients across the products, and ask a pharmacist or doctor first if you take prescription medicines.

How to Use This Information Tonight

If you take a high-dose melatonin product and want to reduce it: ask your pharmacist or doctor about a plan. There is no tested schedule for stepping down, and the amount of melatonin in products varies widely from the label, so the amount in a split tablet is uncertain.13 Lower-dose products are available. The few magnesium sleep trials used 250 to 500 mg of elemental magnesium a day for 4 to 8 weeks, in different forms, with mixed results.2,3,4 The US upper limit for supplemental magnesium in adults is 350 mg a day, based on diarrhea; some researchers argue the limit should be re-evaluated.9 Check labels and add up the magnesium from every supplement you take.

If you wake up at 3–4am and can't fall back asleep: this can have many causes, including stress, alcohol, sleep apnea and depression. If it continues for more than a few weeks, or comes with low mood or loud snoring, see a clinician. In the one magnesium trial that measured early morning awakening, the difference from placebo did not reach statistical significance.2

If you sleep 8 hours and wake unrefreshed: this can have many causes, including sleep apnea, alcohol, some medicines, low mood or an irregular sleep schedule, so it is worth raising with a clinician. We did not find magnesium trials that measured sleep architecture such as deep sleep, and a systematic review found the association between magnesium supplementation and sleep disorders uncertain in randomized trials.17 Limiting alcohol and keeping regular sleep and wake times are general sleep-hygiene measures that do not involve supplements.

Timing of any benefit is not established. In the magnesium trials we reviewed, sleep was assessed after 4 to 8 weeks of daily use,2,3,4 so no effect should be expected overnight. It is not known how long magnesium takes to affect sleep, or whether it does so by correcting a deficiency. Melatonin, by contrast, is taken shortly before bed.
🌙 Kasivit Dusk Bundle
The Kasivit Dusk Bundle
Magnesium Glycinate, Ashwagandha KSM-66, and VitaNight (melatonin 2 mg per two-capsule serving, with valerian, chamomile, GABA, L-tryptophan, lemon balm and passion flower). The bundle price is lower than buying individually. Manufactured in the USA using globally sourced ingredients. Not a treatment for any sleep disorder. Talk to a pharmacist or doctor first if you take prescription medicines, are pregnant or breastfeeding, or have kidney or liver disease.
View Kasivit Dusk Bundle → Take the Free Wellness Quiz

Your Questions, Answered

Can I take magnesium and melatonin together?
We are not aware of studies of this specific combination. Melatonin can interact with some medicines, for example some blood-pressure medicines,12 and magnesium can reduce the absorption of some medicines (see below), so check with your pharmacist if you take prescriptions. If you use melatonin, ask a pharmacist or doctor which dose and timing suit you.
How long does magnesium take to affect sleep?
This has not been established. In the trials we reviewed, sleep was assessed after 4 to 8 weeks of daily use, and results were mixed: some measures improved more with magnesium than with placebo, and in one trial sleep quality improved in both groups.2,3,4 In trials of melatonin, the average effect on the time to fall asleep was about 7 minutes.1
What dose of magnesium glycinate should I take for sleep?
The few sleep trials used 250 to 500 mg of elemental magnesium a day for 4 to 8 weeks, in different forms (bisglycinate, citrate and oxide).2,3,4 The US upper limit for supplemental magnesium in adults is 350 mg a day, because larger amounts commonly cause loose stools; some researchers argue the limit should be re-evaluated.9 Check the label for the amount of elemental magnesium per serving and count the magnesium from every supplement you take. Ask your doctor first if you have kidney disease or take prescription medicines. Kasivit Magnesium Glycinate provides 275 mg of elemental magnesium per 3-capsule serving.
Is it safe to take magnesium every night long-term?
Magnesium sleep trials lasted 4 to 8 weeks, so long-term safety data for sleep use are limited.2,3,4 Healthy kidneys remove extra magnesium, but people with reduced kidney function can build up magnesium to dangerous levels. In a study of people taking magnesium oxide daily, high blood magnesium was linked to advanced chronic kidney disease and to dose,10 and severe, sometimes fatal cases have been reported, including in older people with kidney impairment taking magnesium oxide18 and, rarely, in a person with normal kidney function taking magnesium-containing laxatives.19 Talk to your doctor before taking magnesium if you have kidney disease, take a prescription medicine, or are pregnant or breastfeeding.
Can magnesium affect how other medicines are absorbed?
Yes, it can. In a small crossover trial in 15 healthy adults, magnesium aspartate reduced levothyroxine absorption by 12% and magnesium citrate by a non-significant 7%; glycinate was not tested, and the authors advise people with an underactive thyroid to take levothyroxine separately from magnesium.20 A 1992 review reported that magnesium-containing antacids almost completely inhibit the absorption of fluoroquinolone antibiotics, and that this can persist even when doses are hours apart.21 Other medicines may be affected too; we did not review the evidence for each. Ask your pharmacist how to space magnesium and any prescription medicine, and do not change how you take a prescribed medicine without their advice.
Who should check with a doctor or pharmacist first?
Anyone who is pregnant or breastfeeding, has kidney or liver disease, takes prescription medicines, or is considering magnesium, melatonin or ashwagandha for a child should talk to a doctor or pharmacist first. We did not review safety data for these groups. Melatonin and some other sleep products can cause drowsiness or affect alertness and performance, so do not drive until you know how they affect you.12
I've been taking high-dose melatonin for years. Can I stop?
We could not find good studies on stopping melatonin after long-term use, in either direction (neither a withdrawal effect nor its absence). If you have used a high dose for a long time and want to reduce it, speak with your doctor or pharmacist about a plan rather than changing the dose on your own. There is no tested step-down schedule.

What the Evidence Supports

Melatonin has the clearest evidence for circadian rhythm disorders such as delayed sleep phase and, in blind adults, non-24-hour rhythm disorder, and it gives a modest benefit in time to fall asleep in people with sleep disorders.1,5 The American Academy of Sleep Medicine suggests that clinicians not use it for general sleep-onset or sleep-maintenance insomnia.7 The amount of melatonin in products varies widely between brands.13

Magnesium has been tested in a small number of short trials with modest or mixed results, and sleep problems have many causes, including stress, alcohol, sleep apnea and depression. If trouble sleeping continues for more than a few weeks, or comes with low mood, loud snoring or daytime sleepiness, see a doctor. Supplements do not replace evaluation or treatment of a sleep disorder.

Not sure which sleep issue is most relevant for you? The free Kasivit Wellness Quiz scores your Rest & Recovery dimension alongside the other four dimensions of the Kasivit Wellness Framework — and recommends the products most relevant to your specific profile.

Medical Disclaimer: This article is written for educational purposes by the Kasivit Editorial Team. It does not constitute medical advice and is not a substitute for consultation with your physician or a qualified healthcare provider. If you have a sleep disorder, please consult a specialist. Do not stop or change a prescribed medicine without talking to your prescriber. These statements have not been evaluated by the Food and Drug Administration. Products mentioned are not intended to diagnose, treat, cure, or prevent any disease. 

References: (1) Ferracioli-Oda E, et al. PLoS One. 2013;8:e63773. PubMed · DOI (2) Abbasi B, et al. J Res Med Sci. 2012;17:1161-9. PubMed (3) Nielsen FH, et al. Magnes Res. 2010;23:158-68. PubMed · DOI (4) Schuster J, et al. Nat Sci Sleep. 2025;17:2027-2040. PubMed · DOI (5) Auger RR, et al. J Clin Sleep Med. 2015;11:1199-236. PubMed · DOI (6) Zhdanova IV, et al. J Clin Endocrinol Metab. 2001;86:4727-30. PubMed · DOI (7) Sateia MJ, et al. J Clin Sleep Med. 2017;13:307-349. PubMed · DOI (8) Rosanoff A, et al. Nutr Rev. 2012;70:153-64. PubMed · DOI (9) Costello R, et al. Adv Nutr. 2023;14:973-982. PubMed · DOI (10) Mori H, et al. J Clin Biochem Nutr. 2019;65:76-81. PubMed · DOI (11) Mah J, et al. BMC Complement Med Ther. 2021;21:125. PubMed · DOI (12) Foley HM, et al. Complement Ther Med. 2019;42:65-81. PubMed · DOI (13) Erland LA, et al. J Clin Sleep Med. 2017;13:275-281. PubMed · DOI (14) Khan B, et al. Open Heart. 2026;13:e004108. PubMed · DOI (15) Björnsson HK, et al. Liver Int. 2020;40:825-829. PubMed · DOI (16) McIntyre D, et al. Cureus. 2026;18:e109764. PubMed · DOI (17) Arab A, et al. Biol Trace Elem Res. 2023;201:121-128. PubMed · DOI (18) Yamaguchi H, et al. CEN Case Rep. 2019;8:31-37. PubMed · DOI (19) Bokhari SR, et al. Am J Med Sci. 2018;355:390-395. PubMed · DOI (20) Attinger MC, et al. Clin Transl Sci. 2025;18:e70409. PubMed · DOI (21) Radandt JM, et al. Clin Infect Dis. 1992;14:272-84. PubMed · DOI
K
Kasivit Editorial Team
Wellness content curated by the Kasivit team. All supplement information is for educational purposes only and does not constitute medical advice. Consult your healthcare provider before starting any supplement.