Melatonin is the hormone the pineal gland releases as darkness falls. It does not sedate in the way a sleeping tablet does - it signals to the body that night has arrived, shifting the internal clock. That distinction explains almost everything about using it well: timing matters more than dose, and taking it at the wrong hour can shift your clock in the wrong direction.
Follow the instructions on your label. This guide contains no doses.
It is prescription-only in the UK
Unlike in the United States and several other countries, melatonin is a prescription medicine in the UK.
A prolonged-release preparation is licensed for short-term insomnia in people aged 55 and over, and preparations are licensed for sleep problems in children and adolescents with ADHD or autism spectrum disorder where behavioural measures have not worked.
It is also used off-label for jet lag, shift work and circadian rhythm disorders.
Buying it abroad or online
Melatonin bought as a supplement overseas is not regulated as a medicine, and studies analysing such products have repeatedly found content varying widely from the label - some containing a fraction of the stated amount, some several times more, and some containing serotonin as a contaminant.
If you take melatonin obtained that way, tell your GP. It changes nothing about your care except that they know - and it matters if you are on other medicines.
See checking an online pharmacy is legitimate.
Timing, not dose
Melatonin shifts the body clock according to when it is taken.
Taken in the evening, it advances the clock - making you sleepy earlier. Taken in the morning, it delays it, which is the opposite of what most people want.
Larger doses do not produce more sleep; they mostly produce more next-day grogginess. Physiological amounts taken at the right time work better than large amounts at the wrong one.
For sleep-onset insomnia it is generally taken one to two hours before the desired bedtime.
Light matters as much
Melatonin works alongside light exposure, which is the more powerful signal.
Bright light in the morning advances the clock; bright light in the evening delays it. Taking melatonin at night while scrolling a bright screen works against itself.
Dim light in the evening, and daylight soon after waking, do more than the tablet for most people.
Children
In children with ADHD or autism and persistent sleep problems, melatonin has reasonable evidence and is widely prescribed - usually initiated by a specialist after behavioural approaches.
Two points matter:
It is not a substitute for sleep hygiene. Consistent bedtimes, a wind-down routine, no screens before bed and a dark room remain the foundation, and melatonin works considerably better alongside them.
It should be reviewed rather than continued indefinitely, with periodic trials off it.
Accidental ingestion by young children has risen sharply in countries where melatonin is sold freely as gummies - keep it well out of reach. See keeping medicines away from children.
Jet lag
For eastward travel across several time zones, melatonin taken at the destination bedtime for a few days helps the clock adjust faster.
Westward travel is generally easier and needs it less.
Combining it with light exposure at the right times - daylight in the destination morning after eastward travel - works better than either alone.
See medicines across time zones, which matters if you take other medicines on a fixed schedule.
Side effects
Melatonin is well tolerated. Headache, daytime drowsiness, dizziness and nausea are the common effects.
Vivid dreams occur. Some people report low mood or irritability.
Prolonged-release tablets must be swallowed whole - see cutting and crushing tablets.
Do not drive if you feel drowsy - see medicines and driving.
Interactions
Melatonin is cleared largely by CYP1A2. Fluvoxamine raises its levels substantially and the combination is avoided. Ciprofloxacin does the same to a lesser degree - see ciprofloxacin.
Smoking induces the enzyme and lowers levels, so stopping smoking can raise them.
It adds to the effect of other sedatives and alcohol, and may affect anticoagulant control - see warfarin.
Shift work
For night shifts, melatonin taken before the intended daytime sleep can help, though the evidence is weaker than for jet lag and the practicalities are harder - the body clock is being asked to shift repeatedly rather than once.
Blackout blinds, a consistent sleep schedule on days off where possible, and bright light during the shift do more. Anyone on shift work taking other medicines on a fixed schedule should ask how to space them.
When insomnia needs looking at differently
See your GP if you snore heavily and wake unrefreshed, which suggests sleep apnoea; if you have restless legs; if you wake early with low mood; or if pain wakes you.
Each has a specific treatment that melatonin would only mask. And cognitive behavioural therapy for insomnia outperforms any medication in the long term - see sleeping tablets.
Risperidone: Prolactin and Depot Injections covers a related point, and the Conditions section has the rest of these guides.