Sleep
The best-evidenced supplements for sleep, ranked by the research
A plain-language look at what the science actually says about melatonin and magnesium for sleep, graded by evidence strength.

Short answer: Melatonin has the strongest evidence for specific sleep timing problems such as jet lag and delayed sleep-wake phase disorder, though the NIH rates that evidence as limited to moderate depending on the use case. Magnesium plays well-established roles in nerve and muscle function, but direct evidence linking supplementation to better sleep in healthy adults remains thin.
How we ranked these supplements
Every rating in this guide comes directly from the NIH Office of Dietary Supplements (ODS) and the National Center for Complementary and Integrative Health (NCCIH). We use four evidence tiers that mirror their language: Strong, Moderate, Limited, and Insufficient. A higher tier means more and better-designed research supports a specific claim. A lower tier does not mean a supplement is useless, only that the science is not yet settled.
Please note that supplements are not intended to diagnose, treat, cure or prevent any disease and these statements have not been evaluated by the FDA. For personal dosing advice, consult a clinician or pharmacist before starting any supplement.
1. Melatonin
What it is and what it does
Melatonin is a hormone produced by the pineal gland in response to darkness. According to the NIH, it helps time the body's circadian rhythms, the roughly 24-hour internal clock, and signals the body that it is time to sleep. Light exposure at night can suppress its natural production.
Evidence for sleep
- Strong: Melatonin is a hormone that helps regulate the body's circadian rhythm and the timing of sleep. This foundational role is well established.
- Moderate: Melatonin supplements may reduce anxiety before surgery, which is not a direct sleep benefit but reflects a calming effect.
- Limited: Melatonin supplements may help reduce symptoms of jet lag. Separately, melatonin may help people with delayed sleep-wake phase disorder (DSWPD) fall asleep sooner, and may improve time to fall asleep and total sleep in some children with sleep problems.
- Insufficient: Evidence that melatonin is an effective treatment for chronic insomnia is rated insufficient by the NIH. The same rating applies to its use in helping shift workers sleep.
The takeaway is that melatonin is most clearly useful for circadian timing problems, specifically jet lag and DSWPD, rather than for general or chronic insomnia.
Safety and upper limits
The NIH has not established an adult daily target or a formal upper intake level for melatonin. Short-term use appears safe for most people, but the NIH notes there is not enough information on long-term safety, and at doses higher than the body normally produces the overall safety picture is unclear. Reported side effects are generally mild and include headache, dizziness, nausea, and daytime sleepiness. Because melatonin can cause drowsiness, you should avoid driving or operating machinery after taking it.
Drug interactions
Talk to a doctor before combining melatonin with any medication. Key interactions identified by the NIH include:
- Blood-thinning medicines such as warfarin: melatonin may increase bleeding risk and should be used only under medical supervision.
- Anticonvulsant medicines: people with epilepsy should be under medical supervision, as melatonin may affect seizure control.
- Sedatives, hypnotics, and alcohol (for example benzodiazepines, zolpidem, eszopiclone): combining these with melatonin may cause excessive sedation.
- CYP1A2 inhibitors such as fluvoxamine: these can raise melatonin blood levels because melatonin is metabolized by the CYP1A2 enzyme. Estrogens and quinolone antibiotics may also increase melatonin levels.
2. Magnesium
What it is and what it does
Magnesium is an essential mineral that, according to the NIH ODS, serves as a cofactor in more than 300 enzyme systems. It supports normal muscle and nerve function, contributes to blood glucose control, and plays a role in blood pressure regulation. These are foundational physiological roles rated as Strong by the NIH.
Evidence for sleep
The NIH does not currently list a specific evidence-graded claim for magnesium and sleep in the way it does for melatonin. Magnesium's relevance to sleep is largely indirect, resting on its well-established role in nerve function and muscle relaxation. Researchers have explored whether correcting low magnesium levels might improve sleep quality, but this remains an active area of study rather than a settled conclusion. Anyone seeing bold claims about magnesium as a proven sleep cure should treat those with caution.
Other evidence-graded benefits
- Moderate: Magnesium may help prevent migraine headaches.
- Limited: Adequate dietary magnesium is associated with lower risk of high blood pressure, lower risk of type 2 diabetes, better bone mineral density, and lower risk of stroke and cardiovascular disease.
Safety and upper limits
Magnesium from food is safe for healthy people because the kidneys excrete excess amounts. However, the NIH ODS sets the Tolerable Upper Intake Level for supplemental magnesium at 350 mg per day for anyone aged 9 and older. This limit is specifically for magnesium from dietary supplements and medications and does not include magnesium naturally present in food and beverages. Exceeding this level can cause diarrhea and other gastrointestinal effects. Some research studies have used doses above this limit, but those protocols should be followed only under a clinician's supervision.
Adult daily targets from the NIH ODS are 400 to 420 mg for men and 310 to 320 mg for women aged 19 to 50, covering all sources combined.
Drug interactions
Consult a pharmacist or doctor if you take any of the following:
- Bisphosphonates such as alendronate: magnesium can reduce their absorption; separate dosing by at least 2 hours.
- Tetracycline and quinolone antibiotics: magnesium can form complexes that reduce antibiotic absorption; take antibiotics at least 2 hours before or 4 to 6 hours after a magnesium supplement.
- Loop and thiazide diuretics such as furosemide and hydrochlorothiazide: chronic use can increase urinary magnesium loss and lead to deficiency.
- Potassium-sparing diuretics such as amiloride and spironolactone: these reduce magnesium excretion and may raise magnesium levels.
Bottom line
Of the two supplements covered here, melatonin has the more direct and better-graded evidence for specific sleep timing issues, particularly jet lag and DSWPD. Magnesium has a strong evidence base for its general physiological roles, but its connection to sleep specifically is less clearly established by current research. Neither supplement should be treated as a first-line solution for chronic insomnia without speaking to a healthcare provider, and both carry meaningful drug interactions that make a conversation with your doctor or pharmacist an important first step.
Sources
- S1.gov verifiedNIH National Center for Complementary and Integrative Health (NCCIH)Melatonin: What You Need To Knowwww.nccih.nih.gov/health/melatonin-what-you-need-to-
- S2.gov verifiedNIH National Center for Complementary and Integrative Health (NCCIH)Sleep Disorders and Complementary Health Approaches: Usefulness and Safetywww.nccih.nih.gov/health/sleep-disorders-what-you-ne
- S3.gov verifiedNIH Office of Dietary Supplements (ODS)Dietary Supplement Fact Sheets (Melatonin listing, source: NCCIH)ods.od.nih.gov/factsheets/list-all/
- S4.gov verifiedInstitute of Medicine (IOM/NASEM) and National Research CouncilDietary Supplements: A Framework for Evaluating Safety - Appendix F: Melatonin Prototype Monograph Summarywww.ncbi.nlm.nih.gov/books/NBK216058/
- S5.gov verifiedNIH Office of Dietary SupplementsMagnesium - Health Professional Fact Sheetods.od.nih.gov/factsheets/Magnesium-HealthProfession