Home · Interactions · Caffeine + Melatonin

Interaction fact sheet · Alert

Caffeine and melatonin

Updated on 20 septembre 2026

Take separatelyModerate evidenceSupplement + supplement

Opposing effects: take them at different times of day.

Caffeine taken in the evening delays the circadian clock and disrupts sleep even when taken up to 6 hours before bedtime. Combining a stimulant with a sleep aid makes no sense: save caffeine for the morning.

What caffeine does to your rhythm

Burke and colleagues showed that a caffeine dose equivalent to a double espresso, taken 3 hours before usual bedtime, delays the circadian rhythm of melatonin by approximately 40 minutes. The double-blind, placebo-controlled study with within-subject measurements identifies a mechanism involving adenosine receptors. In other words: evening coffee does not just keep you from sleeping; it shifts the clock that triggers your night.

Drake and colleagues added to the picture: 400 mg of caffeine taken 0, 3 or 6 hours before bedtime significantly disrupts sleep compared with placebo, even with a 6-hour gap. Hence the minimum rule: no substantial dose of caffeine in the 6 hours before bedtime.

What melatonin can and cannot do

Ferracioli-Oda and colleagues conducted a meta-analysis of 19 trials involving 1,683 participants: melatonin reduces sleep onset latency by about 7 minutes and increases total sleep time by about 8 minutes, with slightly improved sleep quality. Real but modest effects that do not offset caffeine taken too late.

Cautious approach

Take your caffeine in the morning and early afternoon, then stop at least 6 hours before bedtime (8 to 10 if you are sensitive). If you use melatonin, take it during an evening already protected from caffeine, not to make up for a 6 pm coffee. To calculate your cutoff time based on your bedtime, use the caffeine calculator.

Limits

The Burke trial was conducted under controlled laboratory conditions, with a single dose and a within-subject design: it demonstrates the mechanism, not the exact size of the shift you will experience on a given evening. The melatonin meta-analysis covers primary sleep disorders, with varying doses and durations. If you have persistent insomnia or are currently receiving treatment, talk to your doctor rather than relying on your stack.

Main sources

  1. 01Burke TM et al. Effects of caffeine on the human circadian clock in vivo and in vitro. Science Translational Medicine, 2015. PubMed 26378246
  2. 02Drake C et al. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine, 2013. PubMed 24235903
  3. 03Ferracioli-Oda E et al. Meta-analysis: melatonin for the treatment of primary sleep disorders. PLoS One, 2013. PubMed 23691095

Frequently Asked Questions (FAQ)

  • Does melatonin cancel out the effects of caffeine?

    No, this has not been demonstrated. Caffeine blocks adenosine receptors and delays your melatonin rhythm, while exogenous melatonin has modest effects on falling asleep. Taking them together is like pressing the accelerator and the brake at the same time: take them separately rather than stacking them.

  • How long before bedtime should you stop having caffeine?

    At least 6 hours. In the Drake trial, 400 mg of caffeine taken 6 hours before bedtime still significantly disrupted sleep. If you are sensitive or a slow metabolizer, aim for 8 to 10 hours.

Partager cette fiche

X f in