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 common sleep supplements, and apigenin, the calming compound in chamomile, is getting more attention. They work in 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. Our Melatonin Nasal Spray pairs a low 200 mcg serving of melatonin with 17 mg of L theanine in each two spray serving.

The short answer: melatonin is a timing hormone. Its best evidence is for timing problems such as jet lag, a late body clock and daytime sleep after night shifts, and in jet lag trials 0.5 to 5 mg worked similarly (Herxheimer and Petrie, 2002). Magnesium is an essential mineral; in older adults with insomnia it shortened the time to fall asleep by about 17 minutes, based on low quality evidence (Mah and Pitre, 2021). Apigenin has the least human evidence, and most of it comes from chamomile. 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 17 mg of L theanine per 2 spray serving, for your bedtime routine.

Shop Melatonin Nasal Spray

Third party tested ingredients.

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

A cofactor in more than 300 enzyme systems, including muscle and nerve function

Shifts and reinforces your sleep wake timing

Binds benzodiazepine receptor sites in lab and mouse studies

Best for

An evening routine; studied in older adults with insomnia

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 in primary sleep disorders

Small trials, mainly of chamomile

Typical dose

Up to 350 mg a day from supplements (upper limit)

0.5 to 5 mg in jet lag trials

Not established; most trials used chamomile

Timing

Evening

Close to target bedtime in jet lag trials; our spray is one 2 spray serving, used once nightly at bedtime

Evening; our coming soon sleep powder is planned for 30 to 60 minutes before bed

Most reported side effects

Diarrhea, nausea and cramps at high supplement doses

Daytime sleepiness, headache and dizziness, mostly mild

Mild events in a few chamomile trials

How Melatonin Works

Brain anatomy showing sleep hormone regulation

Melatonin is a hormone from the pineal gland that plays a central part in regulating the body's daily rhythms (Herxheimer and Petrie, 2002). In people with delayed sleep phase disorder, melatonin moved sleep onset about 40 minutes earlier and shifted the body's own melatonin rhythm by about 1.2 hours (van Geijlswijk et al., 2010). A 2013 meta analysis of 19 trials in 1,683 people with primary sleep disorders found it shortened the time to fall asleep by about 7 minutes and added about 8 minutes of sleep on average, effects the authors called modest (Ferracioli Oda et al., 2013).

  • Best uses: jet lag, where 9 of 10 trials found it reduced jet lag after flights across five or more time zones (Herxheimer and Petrie, 2002); daytime sleep after a night shift, about 24 minutes longer in low quality evidence (Liira et al., 2014); and a body clock that runs late (van Geijlswijk et al., 2010).
  • Dose: in jet lag trials, 0.5 to 5 mg worked similarly, though people fell asleep faster and slept better on 5 mg, and doses above 5 mg were no more effective (Herxheimer and Petrie, 2002). In 37 trials, side effects were few and mostly mild, most often daytime sleepiness, headache and dizziness (Besag et al., 2019).
  • Label accuracy: in 31 melatonin supplements, measured melatonin ranged from 83 percent below to 478 percent above the label, and more than 71 percent were not within 10 percent of the label claim (Erland and Saxena, 2017). A 2023 study also compared the melatonin measured in US gummies with their labels (Cohen et al., 2023).
  • Who should check first: anyone pregnant or breastfeeding, and anyone taking prescription medicines, including 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 is a cofactor in more than 300 enzyme systems, including those for muscle and nerve function, and low intake is common in the United States. 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?

Keep supplemental magnesium at or below 350 mg a day unless a clinician advises otherwise, and check first if you have kidney problems, because impaired kidney function raises the risk of magnesium toxicity (NIH ODS: Magnesium).

If you want magnesium in a gentle form alongside zinc and boron, our Vitamin D Cofactor Capsules are coming soon and will provide 100 mg as magnesium bisglycinate per 2 capsules, well under that limit (join the launch list on its page).

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 parsley, celery, chamomile and other plant foods (Wang et al., 2019). In lab studies it binds the benzodiazepine receptor site that some sleep medicines target, and in mice it reduced anxiety, with only a mild sedative effect at a tenfold higher dose. Human research so far has mostly tested chamomile rather than apigenin on its own: a meta analysis of 12 trials found chamomile improved sleep quality, with mild adverse events reported in three trials (Hieu et al., 2019). If you are pregnant, or take sedatives or blood thinners, check with a clinician first.

Which Should You Take?

Scientific comparison of sleep supplement compounds

  • You are jet lagged, work shifts, or cannot fall asleep until very late: melatonin, timed close to your target bedtime (Herxheimer and Petrie, 2002).
  • You are tense at night or your diet is low in magnesium: magnesium in the evening, within the 350 mg supplement limit (NIH ODS: Magnesium).
  • Your mind races at bedtime: L theanine; in a 4 week trial in 30 healthy adults, 200 mg a day lowered stress related symptom scores and improved sleep quality scores (Hidese et al., 2019); see sleep supplements without melatonin.
  • You want the gentlest option: chamomile tea as part of a wind down routine; chamomile improved sleep quality in a meta analysis of small trials (Hieu et al., 2019).

Can You Take Magnesium and Melatonin Together?

They work through different systems and have been studied together: in a placebo controlled trial in 43 long term care residents with insomnia, a nightly supplement of 5 mg melatonin, 225 mg magnesium and 11.25 mg zinc for 8 weeks improved sleep quality scores (Rondanelli et al., 2011). Check with your clinician first if you take prescription medicines, and 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: in the evening, for example with your evening meal.
  • Melatonin: follow the label; in jet lag trials it was taken close to the target bedtime at the destination (Herxheimer and Petrie, 2002), and our Melatonin Nasal Spray is one 2 spray serving, used once nightly at bedtime.
  • Apigenin or chamomile: in the evening; our coming soon sleep powder is planned for 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 is planned with 200 mg of magnesium and 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 at least 6 hours before bed; 400 mg of caffeine disturbed sleep even when taken 6 hours before bedtime (Drake et al., 2013)
  • A cool, dark, quiet bedroom
  • Less alcohol, especially late in the evening; it increases sleep disruption in the second half of the night (Ebrahim et al., 2013)

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.

How to Choose the Right Delivery Format and Stack

This guide compares magnesium, melatonin and apigenin. We do not sell a magnesium or apigenin product today, so the options below are the sleep products we do make, and how they fit next to the magnesium you may already take.

Option What is in it Best fit
Melatonin Nasal Spray 200 mcg of melatonin and 17 mg of L theanine per two spray serving You want a low, measured melatonin serving at bedtime
Theanine Nasal Spray 36 mg of L theanine per two spray serving, with no melatonin You want to wind down without melatonin
Sleep Stack Lithium Orotate Supplement, Theanine Nasal Spray and Melatonin Nasal Spray You want one evening routine with three formulas

If magnesium already works for you, you do not have to drop it. Melatonin Nasal Spray covers the timing side of sleep, and many people keep their magnesium with dinner. Theanine Nasal Spray suits people who want a calm evening routine without melatonin, used once daily.

The Sleep Stack lays out a full evening. The product page suggests Lithium Orotate with your evening meal, Theanine Nasal Spray as you start to wind down, and Melatonin Nasal Spray at bedtime, each at the serving on its label.

Give any new routine about 90 days, used at the same time each night, before you judge it. Our Learn library has more plain language guides, and the melatonin ingredient guide explains how your body makes and uses it.

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
  • Herxheimer A, Petrie KJ. Melatonin for the prevention and treatment of jet lag. Cochrane Database of Systematic Reviews, 2002. PubMed
  • Liira J et al. Pharmacological interventions for sleepiness and sleep disturbances caused by shift work. Cochrane Database of Systematic Reviews, 2014. PubMed
  • van Geijlswijk IM et al. The use of exogenous melatonin in delayed sleep phase disorder: a meta analysis. Sleep, 2010. PubMed
  • Besag FMC et al. Adverse events associated with melatonin for the treatment of primary or secondary sleep disorders: a systematic review. CNS Drugs, 2019. PubMed
  • Erland LA, Saxena PK. Melatonin natural health products and supplements: presence of serotonin and significant variability of melatonin content. Journal of Clinical Sleep Medicine, 2017. PubMed
  • Wang M et al. A Review on Flavonoid Apigenin: Dietary Intake, ADME, Antimicrobial Effects, and Interactions with Human Gut Microbiota. BioMed Research International, 2019. PubMed
  • Hieu TH et al. Therapeutic efficacy and safety of chamomile for state anxiety, generalized anxiety disorder, insomnia, and sleep quality: a systematic review and meta analysis. Phytotherapy Research, 2019. PubMed
  • Hidese S et al. Effects of L theanine administration on stress related symptoms and cognitive functions in healthy adults: a randomized controlled trial. Nutrients, 2019. PubMed
  • Rondanelli M et al. The effect of melatonin, magnesium, and zinc on primary insomnia in long term care facility residents in Italy: a double blind, placebo controlled clinical trial. Journal of the American Geriatrics Society, 2011. PubMed
  • Bannai M et al. The effects of glycine on subjective daytime performance in partially sleep restricted healthy volunteers. Frontiers in Neurology, 2012. PubMed
  • Drake C et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 2013. PubMed
  • Ebrahim IO et al. Alcohol and sleep I: effects on normal sleep. Alcoholism: Clinical and Experimental Research, 2013. PubMed

Keep exploring: Compare supplement forms in our research and comparison hub.

FAQs

Is magnesium or melatonin better for sleep?

Melatonin has the stronger evidence for timing problems such as jet lag and a late body clock (Herxheimer and Petrie, 2002). Magnesium shortened the time to fall asleep in older adults with insomnia, in low quality trials (Mah and Pitre, 2021).

Can I take magnesium and melatonin at the same time?

They have been studied together: a nightly melatonin, magnesium and zinc supplement improved sleep quality scores in older adults with insomnia (Rondanelli et al., 2011). Check with your clinician if you take prescription medicines, and 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 (Hieu et al., 2019).

Which magnesium is best for sleep?

Forms such as citrate tend to be absorbed better than oxide, and oxide is one of the forms most often linked to diarrhea (NIH ODS: Magnesium). Glycinate also supplies glycine, and threonate is marketed mainly for brain health.

Can I take melatonin every night?

In trials, melatonin was generally regarded as safe and well tolerated, but most ran 4 weeks or less, so evidence on long term nightly use is limited (Besag et al., 2019). If you need a sleep aid most nights for more than a few weeks, talk with a clinician.

Magnesium and Melatonin Buying and Protocol FAQs

I Already Take Magnesium at Night. How Do I Add Melatonin Nasal Spray?

Keep your magnesium where it is, often with dinner. Then add Melatonin Nasal Spray as the last step of your evening routine.

One serving is two sprays, one in each nostril, used once nightly at bedtime. Breathe in gently as you spray, tilt your head back slightly and wait at least 1 to 2 minutes before blowing your nose.

Change one thing at a time. If you add melatonin and a new magnesium form in the same week, you will not know which one made the difference.

How Do I Keep the Melatonin Routine Steady?

Use one 2 spray serving, one spray in each nostril, once nightly at bedtime.

If the routine does not seem to suit you, talk with your clinician first rather than changing it on your own.

It also helps to look at the basics. A dark, cool room, a steady wake time and less screen light in the last hour all support the same timing signal melatonin sends.

Can I Use the Sleep Stack If I Take Apigenin or Chamomile?

Many people do, since apigenin comes from chamomile and the stack does not contain it. Keep the amounts on each label and avoid doubling up on products with the same ingredient.

Do not combine melatonin with alcohol, as the Sleep Stack page notes. Skip Lithium Orotate if you take prescription lithium, and talk with your healthcare practitioner first if you take any prescription medicine.

If you are pregnant or nursing, check with your clinician before starting any of these. Bring the labels so they can see every amount in each serving.

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 17 mg of L theanine per 2 spray serving, for your bedtime routine.

Shop Melatonin Nasal Spray

Third party tested ingredients.

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