“You need to stop caffeine several hours before bed to protect your sleep.”
Caffeine can disturb sleep for many hours, so stopping it several hours before bed does help protect sleep, especially after large doses.
Cutting off caffeine several hours before bed is a simple, low-cost way to protect your sleep. Falling asleep easily does not prove caffeine had no effect, since it can still shorten your sleep or make it less efficient.
Start by avoiding substantial caffeine for at least six hours before bed, and use an earlier cutoff for high doses or persistent sleep problems. Keep the timing stable for two weeks and compare sleep and daytime alertness.
Safety note: Caffeine may worsen anxiety, reflux, tremor or palpitations. Products can contain very different doses, and abrupt reduction after heavy regular use can cause withdrawal symptoms.
Talk to a healthcare professional if: you have ongoing palpitations or severe insomnia, you have questions about caffeine during pregnancy, or you stay sleepy during the day even with enough time for sleep.
Moderate confidence. Controlled trials and a meta-analysis show that caffeine can disrupt later sleep, including when a large dose is taken six or more hours before bed. The size of the effect and the needed cutoff vary substantially with dose and individual sensitivity.
Caffeine can disturb sleep for many hours, so stopping it several hours before bed does help protect sleep, especially after large doses. A 400 mg dose disrupted sleep even when taken six hours before bed, while a 100 mg dose had no clear effect when taken four hours before. Some people are more sensitive than others.
There is no single cutoff that fits every drink and every person. Total daily caffeine, serving size, metabolism, pregnancy, medications and habitual bedtime all affect the result.
- Drake C, Roehrs T, Shambroom J, Roth T. Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed. Journal of Clinical Sleep Medicine. 2013;9(11):1195-1200. doi:10.5664/jcsm.3170. PMID:24235903; PMCID:PMC3805807
- Gardiner C, et al. The effect of caffeine on subsequent sleep: a systematic review and meta-analysis. Sleep Medicine Reviews. 2023;69:101764. doi:10.1016/j.smrv.2023.101764. PMID:36870101
- Gardiner C, et al. Dose and timing effects of caffeine on subsequent sleep: a randomised clinical crossover trial. Sleep. 2025;48(4):zsae230. doi:10.1093/sleep/zsae230