How Melatonin Works: Your Body's Sleep Signal
Melatonin is one of the most misunderstood compounds in health. Most people think of it as a sleep hormone that puts you to sleep, so they take it like a sleeping pill, in large doses, when they want to feel drowsy. That is not what melatonin does. Understanding what it actually does changes how you use it and why most people use it wrong.
What Melatonin Is
Melatonin is a hormone produced by the pineal gland, a small structure deep in the brain. It is synthesised from serotonin and released in response to darkness. Its primary function is to signal to the body that it is night.
Melatonin does not generate sleep. It sets the timing of sleep by adjusting the circadian clock. Think of it as the body's announcement that darkness has arrived. In response to that signal, dozens of biological processes that are calibrated to happen at night, including core temperature drops, cortisol suppression, and shifts in immune activity, begin to occur.
How Melatonin Is Produced
The process starts with light. The retina contains photoreceptors that detect ambient light levels and relay information to the suprachiasmatic nucleus (SCN), the master circadian clock in the hypothalamus. During the day, the SCN actively suppresses melatonin production. As light fades in the evening, this suppression lifts, and the pineal gland begins producing melatonin.
Melatonin typically starts rising a couple of hours before your habitual sleep time, peaks in the middle of the night, and declines by early morning as light begins to return. The pattern is consistent and remarkably sensitive to light. Even relatively dim light, around 10 lux, can delay the melatonin rise, and bright light exposure in the evening can suppress it significantly.
A study in the Journal of Clinical Endocrinology and Metabolism found that exposure to ordinary room light before bedtime suppressed melatonin onset by about 1.5 hours and reduced total melatonin duration by 90 minutes compared to dim light conditions (Gooley et al., 2011). This is the mechanism behind the advice to dim your environment in the evenings.
For more on how light exposure affects sleep timing, see our article on blue light and sleep.
What Melatonin Does in the Brain and Body
Melatonin acts on melatonin receptors (MT1 and MT2) in the SCN and elsewhere. Through MT1 receptors, it inhibits the SCN's firing rate, which reduces the circadian wake-promoting signal. Through MT2 receptors, it shifts the phase of the circadian clock, which is why it is effective for jet lag and shift work.
Outside the brain, melatonin acts on receptors in blood vessels (contributing to vasodilation and the drop in core body temperature), the immune system, and the gut. Its role is fundamentally one of temporal coordination: synchronising body systems to the expected timing of night.
The Right Dose
Your body produces somewhere between 0.1 and 0.3mg of melatonin at night, with blood concentrations peaking at around 100 to 200 picograms per millilitre. Most over-the-counter melatonin products sell 3mg, 5mg, or 10mg tablets. These deliver 10 to 50 times the physiological amount.
Research on melatonin dosing consistently shows that 0.3 to 0.5mg is as effective as higher doses for improving sleep onset, and that doses above 1mg produce no additional benefit while substantially increasing the risk of morning grogginess, daytime drowsiness, and disruption to the body's own melatonin production over time.
This is a case where more is clearly not better. The signal function of melatonin is not dose-dependent beyond a threshold that is far lower than what most products provide.
When Melatonin Actually Helps
Because melatonin works by shifting circadian timing rather than by inducing sleep directly, it is most useful in situations involving circadian misalignment.
Jet lag is the clearest use case. Taking 0.5mg at the destination bedtime for the first few days after crossing time zones helps the circadian clock shift faster to the new schedule. The evidence for this application is strong and consistent.
Shift work presents a similar logic. Melatonin can help workers adjust their sleep timing when their schedule requires sleeping at a time that conflicts with their natural circadian phase.
Delayed sleep phase syndrome, where a person's circadian clock is naturally shifted later than conventional bedtimes, also responds well to small doses of melatonin taken two to three hours before desired sleep time.
For understanding what drives your circadian timing and how to adjust it, see our full article on circadian rhythm explained.
Why Most People Are Using Melatonin Wrong
Taking 5mg of melatonin every night because you have trouble sleeping is a category error. The problem for most people with insomnia is not a melatonin deficiency. It is a combination of poor sleep hygiene, circadian disruption from light exposure, stress-driven cortisol elevation, and inadequate sleep pressure. Melatonin addresses none of these.
Large doses also send a misleading signal to the brain. Consistently flooding the system with exogenous melatonin can suppress the pineal gland's own production over time, making you more dependent on supplementation rather than less.
If your goal is better sleep quality rather than circadian realignment, the evidence points to addressing the upstream causes: consistent sleep timing, morning light exposure, evening light reduction, and addressing the neural arousal that keeps people from falling and staying asleep.
What This Means for Your Sleep
Melatonin is a timing hormone, not a sedative. It works by signalling darkness to the brain and coordinating the circadian biology that makes sleep happen at the right time. Its effective dose is far lower than what is sold in most pharmacies, and its best applications are jet lag, shift work, and circadian phase adjustment rather than general nightly sleep improvement.
Understanding this makes the hormone considerably more useful when you do need it, and clarifies why it often disappoints when people reach for it as a general sleep aid.
Sources
- Gooley JJ, et al. (2011). Exposure to room light before bedtime suppresses melatonin onset and shortens melatonin duration in humans. https://pubmed.ncbi.nlm.nih.gov/21193540/
- Buscemi N, et al. (2005). The efficacy and safety of exogenous melatonin for primary sleep disorders. https://pubmed.ncbi.nlm.nih.gov/16145276/
- Arendt J. (2006). Melatonin and human rhythms. https://pubmed.ncbi.nlm.nih.gov/16948779/
Related reading: Blue Light and Sleep: What It Does and How to Manage It | Circadian Rhythm Explained: How Your Body Clock Controls Sleep
About the Author

Nima Koucheki
Founder, Sleep Improvers
Nima Koucheki is the founder of Sleep Improvers. He hosts a podcast and YouTube channel dedicated to sleep science, translating peer-reviewed research into protocols anyone can apply tonight.