Caffeine and Sleep: How Late Is Too Late for Coffee?

This page contains affiliate links. As an Amazon Associate I earn from qualifying purchases.

Coffee can be a useful source of energy during the day, but drinking it too late may interfere with sleep. Caffeine works by blocking adenosine, a chemical that builds up in the brain and promotes sleepiness.

The important question is not only how much coffee you drink, but when you drink it. Caffeine can remain active in the body for several hours, meaning an afternoon cup may still affect your sleep at night.

Caffeine and Its Effects on Sleep

Caffeine is a stimulant that increases alertness and reduces feelings of tiredness. It primarily works by blocking adenosine receptors in the brain. Because adenosine is involved in sleep pressure, blocking its effects can make it harder to feel sleepy.

The effect can extend beyond simply taking longer to fall asleep. Research has linked caffeine consumption with:

  • Less total sleep time
  • Longer time needed to fall asleep
  • More waking during the night
  • Lower sleep efficiency
  • Changes in normal sleep stages

A 2023 systematic review and meta-analysis of 24 studies found that caffeine reduced total sleep time by about 45 minutes on average and reduced sleep efficiency by approximately 7%. It also increased sleep onset latency and time spent awake after initially falling asleep. 2023 systematic review and meta-analysis on PubMed.

Caffeine and Its Effects on Sleep

How Long Caffeine Stays in Your System

Caffeine does not disappear from the body when you stop feeling its stimulating effects. Some caffeine can remain in your system for many hours.

A useful concept here is the caffeine half-life — the amount of time it takes for the body to eliminate approximately half of the caffeine consumed.

For example, if you consume 200 mg of caffeine and your effective half-life is around five hours, roughly 100 mg could remain after five hours. After another five hours, approximately 50 mg could remain.

This is only an example because caffeine metabolism varies considerably between individuals.

Time after 200 mg caffeineApproximate caffeine remaining*
0 hours200 mg
5 hours100 mg
10 hours50 mg
15 hours25 mg
20 hours12.5 mg

This explains why an afternoon coffee can still matter at bedtime even if you no longer feel particularly energized.

How Late Is Too Late for Coffee?

There is no single cutoff time that works for everyone. However, the closer coffee is consumed to bedtime, the greater the chance that caffeine will interfere with sleep.

A controlled study published in the Journal of Clinical Sleep Medicine found that 400 mg of caffeine could significantly disrupt sleep even when consumed six hours before bedtime.

More recent research suggests that the required gap may be even longer for a typical serving of coffee. A 2023 meta-analysis estimated that a coffee containing about 107 mg of caffeine should be consumed at least 8.8 hours before bedtime to avoid a measurable reduction in total sleep time.

For someone going to bed at 10:00 PM, that would put the estimated cutoff around 1:12 PM.

This does not mean everyone must stop drinking coffee at exactly that time. Dose, caffeine sensitivity, metabolism, and individual sleep patterns all matter.

How Late Is Too Late for Coffee

The Best Time to Stop Drinking Coffee Before Bed

If protecting sleep is the priority, a practical approach is to avoid caffeinated coffee during the later part of the day.

BedtimeConservative coffee cutoff
9:00 PMAround noon
10:00 PMAround 1:00 PM
11:00 PMAround 2:00 PM
MidnightAround 3:00 PM

These times are based on the research estimate of approximately 8.8 hours for a 107 mg serving of coffee, rather than a universal medical rule.

Coffee Timing: Morning, Afternoon, and Evening

Morning:
For most coffee drinkers, morning is the easiest time to enjoy caffeine without creating a bedtime problem. It can provide alertness during the first part of the day while leaving more time for caffeine levels to decline.

Afternoon:
Afternoon coffee requires more consideration. A cup at 1 or 2 PM may be fine for some people, while others may notice difficulty falling asleep later. Larger servings deserve particular caution.

Evening:
Evening coffee is the most likely to interfere with sleep, especially when it contains a substantial amount of caffeine. Even if you fall asleep normally, caffeine can still influence total sleep time and sleep architecture.

Caffeine Half-Life and Sleep Quality

Suppose you drink a coffee containing 100 mg of caffeine at 3 PM. If your effective half-life were five hours, approximately 50 mg could remain around 8 PM and about 25 mg around 1 AM.

This does not mean that exactly those amounts will remain in every person’s body. Caffeine metabolism varies, so the calculation is best used to understand the principle rather than predict an individual’s caffeine level.

Sleep can also be affected without an obvious feeling of stimulation. The 2023 meta-analysis found changes in total sleep time, sleep efficiency, sleep onset, and sleep stages following caffeine consumption.

For people who prioritize sleep quality, the goal should therefore be more than simply avoiding the feeling of being “wide awake” at bedtime.

Why Caffeine Affects People Differently

One person may drink coffee after lunch and sleep normally, while another may struggle to fall asleep after the same amount. Several factors can influence the response to caffeine.

Caffeine Dose

A small coffee and a large coffee can contain very different amounts of caffeine. Higher doses are generally more likely to interfere with sleep, particularly when consumed close to bedtime.

Individual Sensitivity

Some people are naturally more sensitive to caffeine. They may experience stronger or longer-lasting effects from the same serving.

Metabolism

The rate at which caffeine is processed varies between individuals. This helps explain why there is no universally perfect coffee cutoff time.

Regular Caffeine Use

Habitual coffee drinkers may perceive caffeine differently from people who rarely consume it. However, becoming accustomed to the stimulating sensation does not necessarily eliminate caffeine’s potential effects on sleep.

Sleep Schedule

Your bedtime matters. A coffee at 3 PM gives the body a different amount of time to process caffeine before a 9 PM bedtime than before a midnight bedtime.

The Bottom Line

If coffee is affecting your sleep, the easiest adjustment is usually to move your last caffeinated coffee earlier rather than simply drinking less at night.

Research suggests that substantial caffeine intake can affect sleep even six hours before bedtime, while a 2023 meta-analysis estimated that a typical 107 mg coffee may need to be consumed roughly 8.8 hours before bed to avoid reducing total sleep time. These findings come from a 2023 systematic review and meta-analysis published in Sleep Medicine Reviews.

For many coffee drinkers, an early-afternoon cutoff is a reasonable starting point. If you are still having trouble sleeping, moving your last coffee to the morning may be worth trying.