“You need to stop caffeine several hours before bed to protect your 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 shorten sleep and delay sleep onset hours after it is consumed. A large 400 mg dose may matter much earlier than a small coffee or tea, and 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.
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: Talk with a clinician for persistent palpitations, severe insomnia, pregnancy-related intake questions, or daytime sleepiness that continues after adequate sleep opportunity.
If sleep is difficult, moving caffeine earlier is a low-cost experiment. Do not assume that falling asleep easily means caffeine had no effect on sleep duration or depth.
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.