Sleep

Magnesium vs Melatonin for Sleep: Which Should You Take? (Plus Apigenin)

A crescent moon beside a capsule on a dark green background, the cover image for our guide to magnesium vs melatonin for sleep.

Magnesium and melatonin are the two most popular sleep supplements, and apigenin, the calming compound in chamomile, is catching up. They work in completely different ways. This guide compares magnesium vs melatonin (and apigenin): how each works, what the research shows, doses, timing, side effects and whether to take them together.

The short answer: melatonin is a timing hormone. It is most useful when your body clock is off, such as jet lag, shift work or a late bedtime you cannot shift, and low doses (0.5 to 3 mg) work as well as high ones. Magnesium is a mineral that supports relaxation; it may help you fall asleep faster, especially if your intake is low, and it is gentle enough for nightly use. Apigenin has the least human evidence. Many people take magnesium nightly and keep melatonin for timing problems.

Melatonin Nasal Spray

Featured in this article

Melatonin Nasal Spray

200 mcg of melatonin with L-theanine per serving, for your bedtime routine.

Shop Melatonin Nasal Spray

Third-party tested ingredients. Vegan, non-GMO, made in the USA.

Magnesium vs Melatonin vs Apigenin at a Glance

Magnesium

Melatonin

Apigenin

What it is

Essential mineral

Hormone that signals night to the body

Flavonoid from chamomile and parsley

How it works

Supports the calming GABA system and muscle relaxation

Shifts and reinforces your sleep-wake timing

Binds calming GABA receptors in lab studies

Best for

Nightly relaxation, low magnesium intake

Jet lag, shift work, a late body clock

A gentle wind-down, often as chamomile

Human evidence

About 17 minutes faster to fall asleep in older adults (low-quality evidence)

About 7 minutes faster to fall asleep and 8 minutes more sleep on average

Small trials, mainly of chamomile extract

Typical dose

200 to 350 mg elemental

0.5 to 3 mg

About 50 mg, or 200 to 400 mg chamomile extract

Timing

Evening

1 to 2 hours before bed for tablets; closer to bed for fast forms

30 to 60 minutes before bed

Next-day grogginess

Rare

Possible, mainly at higher doses

Rare

How Melatonin Works

Brain anatomy showing sleep hormone regulation

Your brain releases melatonin as it gets dark, telling your body it is night. As a supplement, it is best at moving your sleep window, not knocking you out. A 2013 meta-analysis of 19 trials found it shortened the time to fall asleep by about 7 minutes and added about 8 minutes of sleep on average, modest numbers that hide bigger benefits for people whose timing is off.

  • Best uses: jet lag, shift work and a body clock that runs late.
  • Dose: 0.5 to 3 mg is enough for most adults. Higher doses are more likely to cause grogginess or vivid dreams.
  • Label accuracy: a 2023 study found 22 of 25 melatonin gummy products did not match their labels.
  • Who should check first: anyone pregnant or breastfeeding, and people taking blood thinners, blood pressure, seizure or immune medicines.

Our melatonin guide covers dosing in detail, and melatonin nasal spray vs oral melatonin compares delivery forms.

How Magnesium Works

Natural magnesium sources and supplements for sleep

Magnesium helps regulate the calming GABA system and relaxes muscles, and low intake is common. A 2021 meta-analysis of three trials in 151 older adults found magnesium shortened the time to fall asleep by about 17 minutes versus placebo; total sleep time did not improve significantly, and the evidence was rated low quality.

Which Form of Magnesium Is Best for Sleep?

  • Glycinate: gentle on the stomach; glycine itself may support sleep.
  • Glycerophosphate: well absorbed and gentle; see our magnesium glycerophosphate page.
  • Citrate: well absorbed but can loosen stools.
  • Threonate: marketed for the brain; studied mainly for memory, not sleep.
  • Oxide: poorly absorbed; mostly a laxative.

Keep supplemental magnesium at or below 350 mg a day unless a clinician advises otherwise, and check first if you have kidney problems.

If you want magnesium in a gentle form alongside zinc and boron, our Vitamin D Cofactor Capsules provide 100 mg as magnesium bisglycinate per 2 capsules, well under that limit (join the waitlist).

For a closer look at the forms, see magnesium glycinate vs citrate and magnesium bisglycinate vs glycinate.

If you choose magnesium, our guide to magnesium glycinate for sleep explains how much to take and when.

How Apigenin Works

Chamomile flower containing natural apigenin compound

Apigenin is a flavonoid found in chamomile, parsley and celery. In lab studies it binds the same GABA-A receptor site that sleep medicines target, but far more weakly. Human research so far has mostly tested chamomile extract, with small trials measuring sleep quality, rather than stand-alone apigenin supplements (often 50 mg). It is low risk for most people, but avoid it in pregnancy and check with a clinician if you take sedatives or blood thinners.

Which Should You Take?

Scientific comparison of sleep supplement compounds

  • You are jet-lagged, work shifts, or cannot fall asleep until very late: low-dose melatonin, timed carefully.
  • You are tense at night or your diet is low in magnesium: magnesium in the evening.
  • Your mind races at bedtime: L-theanine, which calms without sedation; see sleep supplements without melatonin.
  • You want the gentlest option: chamomile tea as part of a wind-down routine.

Can You Take Magnesium and Melatonin Together?

Yes. They work through different systems and are commonly combined, and there are no known harmful interactions between them in healthy adults. Start one at a time so you know which is helping. A simple approach is magnesium each evening, with a low dose of melatonin only on nights when timing is the problem. For two other common pairings, see apigenin and L-theanine and ashwagandha and melatonin.

Timing Guide

  • Magnesium: with your evening meal or an hour before bed.
  • Melatonin tablets: 1 to 2 hours before your target bedtime; fast forms such as sprays closer to bed.
  • Apigenin or chamomile: 30 to 60 minutes before bed.

Our Sleep Products

Our Melatonin Nasal Spray pairs a low, controlled dose of melatonin with theanine and is made with third-party tested ingredients. If you would rather skip melatonin, our Theanine Nasal Spray is melatonin-free. The Sleep Stack combines both sprays with our Lithium Orotate Supplement, which includes reishi and lemon balm. Browse the full sleep collection.

Prefer magnesium and apigenin without melatonin? Our coming-soon Melatonin-Free Sleep Powder has 200 mg of magnesium and 50 mg of apigenin per scoop, alongside 3 g of glycine and tart cherry, with no added melatonin. You can join the waitlist on its page.

Foundations Matter More Than Any Supplement

  • Morning outdoor light and a steady wake time
  • Caffeine cut off 8 to 10 hours before bed
  • A cool, dark, quiet bedroom
  • Less alcohol, especially late in the evening

See a doctor if poor sleep lasts more than three months, or if you snore loudly, gasp at night or feel very sleepy during the day. More on the basics in the circadian rhythm guide.

Sources

  • Ferracioli-Oda E et al. Meta-analysis: melatonin for the treatment of primary sleep disorders. PLoS One, 2013. PubMed
  • Cohen PA et al. Quantity of Melatonin and CBD in Melatonin Gummies Sold in the US. JAMA, 2023. PubMed
  • Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a Systematic Review and Meta-Analysis. BMC Complementary Medicine and Therapies, 2021. PubMed
  • Viola H et al. Apigenin, a component of Matricaria recutita flowers, is a central benzodiazepine receptors-ligand with anxiolytic effects. Planta Medica, 1995. PubMed
  • NIH Office of Dietary Supplements. Magnesium: Fact Sheet for Health Professionals. ODS
  • National Center for Complementary and Integrative Health. Melatonin: What You Need To Know. NCCIH

FAQs

Is magnesium or melatonin better for sleep?

Melatonin is better for timing problems such as jet lag and shift work. Magnesium is a gentler nightly option that may help you fall asleep faster, especially if your intake is low.

Can I take magnesium and melatonin at the same time?

Yes. There are no known harmful interactions between them in healthy adults, and many people combine them. Start with one so you know which helps.

Is apigenin better than melatonin?

They are studied differently. Melatonin has many more human trials, while apigenin has mostly been studied as part of chamomile, in small trials.

Which magnesium is best for sleep?

Glycinate and glycerophosphate are well absorbed and gentle on the stomach. Oxide is poorly absorbed, and threonate is studied mainly for memory.

Can I take melatonin every night?

Short-term nightly use at low doses appears safe for most adults, and most studies have run for weeks to months. If you need a sleep aid most nights for more than a few weeks, talk with a clinician.

This article is for general education and is not medical advice. Dietary supplements are not intended to diagnose, treat, cure or prevent any disease. Talk with a qualified clinician before starting any new supplement, especially if you take prescription medication.

Melatonin Nasal Spray

Featured in this article

Melatonin Nasal Spray

200 mcg of melatonin with L-theanine per serving, for your bedtime routine.

Shop Melatonin Nasal Spray

Third-party tested ingredients. Vegan, non-GMO, made in the USA.

Leave a comment

All comments are moderated before being published.

This site is protected by hCaptcha and the hCaptcha Privacy Policy and Terms of Service apply.

About the author

Founder and CEO, Synchronicity Health

George Given is the founder and CEO of Synchronicity Health, which he started in 2022. He has worked in supplement formulation and manufacturing since 2017 and has led product formulation as a head formulator since 2019. At Synchronicity he builds every formula around a short, fully disclosed label that lists the amount of every ingredient, and he works only with third-party tested ingredients. Under his direction, most of Synchronicity's sprays were rebuilt around a single active ingredient in alkaline water, and its capsules use vegan capsules with no fillers, no flow agents and no magnesium stearate. He writes about the research behind the ingredients Synchronicity uses, with a focus on what the studies actually measured.

More about George · George on LinkedIn · How we research and check our guides