On average, most people should stop drinking caffeine four to six hours before bed. People who are especially sensitive to this stimulant may want to stop earlier in the day or avoid caffeine altogether.

Figuring out how long before bedyoushould stop drinking caffeine may take some trial and error. If, for example, you moved your last cup of coffee up to 4 p.m. but you are still having restless nights, you may need to push that up even more (or switch to decaffeinated).

This article discusses when to stop drinking caffeine before bed. It also explains how caffeine works to promote wakefulness and how caffeine can hinder your ability to sleep.

Aleksandr Sumarokov / EyeEm / Getty Images

Woman Holding Coffee Cup

How Caffeine Impacts Sleep

Good sleep occurs when it is properly timed to take advantage of both the body’scircadian rhythmand sleep drive. For most people, this means spending a prolonged period awake during the day (typically lasting about 16 hours) and attempting to sleep at night.

The sleep drive is understood as the desire for sleep. It builds gradually with wakefulness due to the accumulation of a chemical calledadenosinein the brain.

Caffeine directly blocks adenosine. This, in effect, reduces sleepiness and may contribute to difficulty falling or staying asleep after it is consumed.

When to Stop Caffeine For the Day

For most people, caffeine should be avoided for four to six hours before bedtime. This is how long it takes the body to metabolize half of its (caffeine) consumption.

But the amount of time that is right for you is highly variable and depends on a few factors:

If you are highly sensitive to the stimulant, you might consider cutting it out after lunch or switching to decaffeinated drinks.

If you never seem to experience insomnia, caffeine may have little impact on your sleep onset and you may not have to worry about consumption at all.

Remember that caffeine can be found in coffee, soda, tea,energy drinks, and even chocolate. There are even some medications and over-the-counter supplements that may contain caffeine, so read ingredient labels carefully.

When to See a Sleep Doctor

Caffeine may affect your sleep, but this may not be the only contributing factor. If you continue to struggle with insomnia, speak with a sleep specialist about other ways to improve your sleep, including participating in acognitive behavioral therapy for insomnia(CBTI) program.

Though caffeine may make it hard to fall asleep at the beginning of the night, other conditions may cause you to frequently wake before morning.

4 SourcesVerywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read oureditorial processto learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.Lazarus M, Chen JF, Huang ZL, Urade Y, Fredholm BB.Adenosine and sleep.Handb Exp Pharmacol. 2019;253:359‐381. doi:10.1007/164_2017_36U.S. Food & Drug Administration.Spilling the beans: How much caffeine is too much?Drake C, Roehrs T, Shambroom J, Roth T.Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed.J Clin Sleep Med. 2013;09(11):1195-200. doi:10.5664/jcsm.3170Harvard Health Publishing.Top 4 reasons why you’re not sleeping through the night.Additional Reading

4 Sources

Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read oureditorial processto learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.Lazarus M, Chen JF, Huang ZL, Urade Y, Fredholm BB.Adenosine and sleep.Handb Exp Pharmacol. 2019;253:359‐381. doi:10.1007/164_2017_36U.S. Food & Drug Administration.Spilling the beans: How much caffeine is too much?Drake C, Roehrs T, Shambroom J, Roth T.Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed.J Clin Sleep Med. 2013;09(11):1195-200. doi:10.5664/jcsm.3170Harvard Health Publishing.Top 4 reasons why you’re not sleeping through the night.Additional Reading

Verywell Health uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read oureditorial processto learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.

Lazarus M, Chen JF, Huang ZL, Urade Y, Fredholm BB.Adenosine and sleep.Handb Exp Pharmacol. 2019;253:359‐381. doi:10.1007/164_2017_36U.S. Food & Drug Administration.Spilling the beans: How much caffeine is too much?Drake C, Roehrs T, Shambroom J, Roth T.Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed.J Clin Sleep Med. 2013;09(11):1195-200. doi:10.5664/jcsm.3170Harvard Health Publishing.Top 4 reasons why you’re not sleeping through the night.

Lazarus M, Chen JF, Huang ZL, Urade Y, Fredholm BB.Adenosine and sleep.Handb Exp Pharmacol. 2019;253:359‐381. doi:10.1007/164_2017_36

U.S. Food & Drug Administration.Spilling the beans: How much caffeine is too much?

Drake C, Roehrs T, Shambroom J, Roth T.Caffeine effects on sleep taken 0, 3, or 6 hours before going to bed.J Clin Sleep Med. 2013;09(11):1195-200. doi:10.5664/jcsm.3170

Harvard Health Publishing.Top 4 reasons why you’re not sleeping through the night.

Meet Our Medical Expert Board

Share Feedback

Was this page helpful?Thanks for your feedback!What is your feedback?OtherHelpfulReport an ErrorSubmit

Was this page helpful?

Thanks for your feedback!

What is your feedback?OtherHelpfulReport an ErrorSubmit

What is your feedback?