Free worksheets

Decoded DailySleep

Does Melatonin Work for Sleep? What It Can and Can't Do

Does Melatonin Work for Sleep? What It Can and Can't Do

It's 1 a.m., you have work at eight, and the bottle of melatonin gummies on the nightstand is looking tempting. Plenty of people take it every night. But does melatonin work the way most people use it, as a nightly sleeping aid? The research gives a clear, slightly deflating answer, plus one situation where it really does earn its place.

Quick answer

For everyday insomnia, melatonin makes only a small difference: on average people fall asleep only slightly sooner. It works better as a body-clock signal than as a sleeping pill, which is why it helps with jet lag when taken at bedtime in the new time zone. When sleeplessness drags on for months, CBT for insomnia (CBT-I) is the treatment to start with.

What does melatonin actually do?

Melatonin is a hormone your brain releases as evening darkness arrives. It does not knock you out. It tells your body clock that night has started, and that signal helps set when you feel sleepy.

That difference matters. A sleeping pill pushes sleep on you. Melatonin nudges the timing of your clock. So it tends to help most when the problem is timing (your clock is out of step with where or when you need to sleep) and least when the problem is a busy, anxious mind lying awake at a normal bedtime.

Light is the clock's main lever, far stronger than a pill. Evening light delays your clock, and early-morning light moves it earlier (▮▮▮▮ Strong). Getting daylight in the morning and keeping evening light dimmer helps shift sleep earlier (▮▮▮▯ Moderate).

Does melatonin work for insomnia?

Only a little. For typical trouble sleeping, the benefit is small (▮▮▮▯ Moderate). Pooled trials show a gain, but it is small enough that many people would not notice it night to night.

SituationDoes melatonin help?Evidence
Jet lag after crossing 5+ time zonesYes, taken at bedtime at your destination▮▮▮▯ Moderate
Ordinary insomniaA little▮▮▮▯ Moderate
Long-term insomniaCBT-I works better and is the first choice▮▮▮▮ Strong
Magnesium insteadNot shown to work▮▯▯▯ Unproven
Valerian, chamomile and other herbsNot shown to treat insomnia▮▯▯▯ Unproven

If you have been taking melatonin every night for months and still sleep badly, that is a sign the problem is not something melatonin fixes.

When does melatonin work best?

Jet lag. Melatonin taken at bedtime in your destination time zone reduces jet lag when you cross five or more time zones (▮▮▮▯ Moderate). Pair it with well-timed light for the biggest effect. Our holiday jet lag plan walks through the timing day by day.

A late body clock. Some of us are larks and some are owls, and where you fall shifts as you get older (▮▮▮▯ Moderate). If you are a natural night owl trying to sleep earlier, morning light is your first tool, and a doctor may suggest melatonin timed in the early evening as a helper.

What works better than melatonin for long-term insomnia?

CBT for insomnia (CBT-I) is what guidelines recommend first when sleeplessness has lasted months (▮▮▮▮ Strong). It is a short, structured program that retrains the link between bed and sleep, sets a steady wake time and deals with the worry loop that keeps you awake. Well-designed CBT-I apps and web courses help too (▮▮▮▯ Moderate), so you do not always need a therapist's office.

Two things that do not work as well as people hope:

  • Sleep hygiene tips alone (dark room, no coffee late, and so on) are usually not enough for long-term insomnia (▮▮▮▯ Moderate). They help, but they are not a treatment on their own.
  • Sleepy antihistamines, the "PM" painkillers and allergy pills, are a poor fix for sleeplessness, and best avoided later in life (▮▮▮▯ Moderate).

If you sleep a full night and still wake up exhausted, the issue may not be falling asleep at all. See why you're still tired after 8 hours of sleep for the causes worth checking, including sleep apnea.

Is melatonin safe to take every night?

Melatonin is sold as a supplement in the US, not as a prescription medicine, so products are not checked the way drugs are. If you use it, keep a few rules in mind.

> Safety box. Use the lowest dose on the label and take it at a consistent time. Talk to a doctor or pharmacist first if you are pregnant, take any regular medicines (including other sleep medicines), or are giving it to a child. Don't drive or use machines if it leaves you groggy. Choose a product that is third-party tested. Loud snoring, gasping at night or falling asleep during the day are reasons to see a doctor, not to take melatonin.

How to tell whether melatonin is working for you

Run a simple two-week test instead of guessing:

  1. For one week, note your bedtime, rough time to fall asleep, wake-ups and how you feel in the morning.
  2. For the next week, keep everything the same and add melatonin at the same time each night.
  3. Compare. If you can't see a difference, you have your answer.

A paper Sleep Log makes this easy, and it gives your doctor something concrete to look at. Don't rely on your watch to settle it: trackers are reasonably good at sleep versus wake but much weaker on sleep stages (▮▮▮▯ Moderate). More on that in is your smartwatch sleep score accurate?

Evidence labels for this article

What we sayLabel
Melatonin's effect on everyday insomnia is small▮▮▮▯ Moderate
Taken at local bedtime after a long eastward or westward trip, it eases jet lag▮▮▮▯ Moderate
Evening light delays the body clock; early-morning light advances it▮▮▮▮ Strong
CBT-I comes first for long-lasting insomnia▮▮▮▮ Strong
Digital CBT-I courses help▮▮▮▯ Moderate
Sleep-hygiene tips on their own rarely fix chronic insomnia▮▮▮▯ Moderate
Sleepy antihistamines are a poor insomnia treatment; older adults should avoid them▮▮▮▯ Moderate
After 60, sleeping pills help a little but cause more side effects▮▮▮▯ Moderate
Magnesium supplements improve sleep▮▯▯▯ Unproven
Herbal remedies such as valerian treat insomnia▮▯▯▯ Unproven

For the full chapters on melatonin, sleeping pills and CBT-I, with every source, see I Slept Eight Hours. Why Am I Still Tired?

Frequently asked questions

Does melatonin work the first night?

For jet lag it can help from the first night at your destination. For ordinary insomnia the effect is small, so many people notice little difference on any single night.

Is it bad to take melatonin every night?

Many people do, but if it hasn't fixed your sleep after a few weeks it probably won't. Long-term insomnia responds better to CBT-I, so it is worth seeing a doctor instead of raising the dose.

Is melatonin better than a sleeping pill?

They do different jobs. Melatonin nudges the body clock, while sleeping pills sedate, and after 60, sleeping pills help a little while making side effects more likely (▮▮▮▯ Moderate). For insomnia that has lasted months, CBT-I is the better place to start, whatever your age.

Does magnesium work for sleep instead?

There is no good evidence that magnesium supplements improve sleep. They are not a reliable replacement for melatonin or CBT-I.

When should I see a doctor about sleep?

If poor sleep lasts more than a few weeks, affects your days, or comes with loud snoring, gasping or dozing off while driving or sitting still.

Sources

  1. Ferracioli-Oda E, Qawasmi A, Bloch MH. Meta-analysis: melatonin for the treatment of primary sleep disorders. PLOS ONE 2013;8(5):e63773. PMC3656905. Sateia MJ, et al. American Academy of Sleep Medicine guideline on pharmacologic treatment of chronic insomnia. J Clin Sleep Med 2017.
  2. Herxheimer A, Petrie KJ. Melatonin for the prevention and treatment of jet lag. Cochrane Database Syst Rev 2002;(2):CD001520.
  3. Khalsa SBS, Jewett ME, Cajochen C, Czeisler CA. A phase response curve to single bright light pulses in human subjects. J Physiol 2003;549(3):945–952. PMC2342968. St Hilaire MA, Gooley JJ, Khalsa SBS, et al. Human phase response curve to a 1 h pulse of bright white light. J Physiol. PMC3406389.
  4. Qaseem A, Kansagara D, Forciea MA, Cooke M, Denberg TD. Management of chronic insomnia disorder in adults: a clinical practice guideline from the American College of Physicians. Ann Intern Med 2016;165:125–133. Edinger JD, Arnedt JT, Bertisch SM, et al. Behavioral and psychological treatments for chronic insomnia disorder in adults: an American Academy of Sleep Medicine clinical practice guideline. J Clin Sleep Med 2021;17(2):255–262. Riemann D, Espie CA, Altena E, et al. The European Insomnia Guideline: an update on the diagnosis and treatment of insomnia 2023. J Sleep Res 2023;32(6):e14035.
  5. Riemann et al. 2023 (Chapter 5). American Geriatrics Society 2023 Updated AGS Beers Criteria for Potentially Inappropriate Medication Use in Older Adults. J Am Geriatr Soc 2023.
  6. Mah J, Pitre T. Oral magnesium supplementation for insomnia in older adults: a systematic review and meta-analysis. BMC Complement Med Ther 2021;21:125. PMC8053283.

Selected from the reference list of I Slept Eight Hours. Why Am I Still Tired?. Last reviewed . How we check our facts.

This article is for education and is not medical advice. Talk to a qualified health professional about your own situation.