Still Awake? Could Your Last Cup of Coffee Be Keeping You Up?
Your last coffee may outlast its initial boost. Here is how caffeine, timing, and your planned bedtime can affect sleep.
Imagine it is 1 AM. You have closed your laptop after studying or finishing work, but sleep is taking its time. The coffee you drank hours earlier no longer feels like a boost. Could it still be involved?
Yes, caffeine could be one reason you are still awake. Its effects can extend into the hours when you want to sleep, even after the initial lift fades. But coffee does not explain every restless night. Stress, changing schedules, and other factors can also interfere with sleep.[1][8] NIH News in Health
Why coffee helps you feel awake

As you stay awake, a chemical called adenosine builds up and contributes to the pressure to sleep. Think of it as part of your body’s growing signal that it is time to rest.
Caffeine blocks the receptors where adenosine would normally act on brain cells. That makes the sleepiness signal less noticeable, helping you feel more alert. It does not mean your need for sleep has disappeared.[1] NIH News in Health
This helps explain why coffee can be useful during work or study, yet inconvenient when the next task is going to bed.
The boost can fade before the caffeine does
CDC’s National Institute for Occupational Safety and Health, or NIOSH, describes caffeine’s half-life as about five to six hours, although it can be longer in some people. Half-life means the time needed for your body to eliminate half the caffeine, not all of it.[2][3]
For a simplified illustration, if your half-life were six hours, a 100-milligram dose would leave about 50 milligrams after six hours and about 25 after twelve. Actual clearance varies, and another caffeinated drink adds to what remains.
There is no single moment when caffeine switches off. How much is left and how strongly you respond both matter. A fading buzz is therefore not a reliable sign that caffeine can no longer affect your sleep.
Timing, amount, and sensitivity work together
“One cup” is an imprecise measure. Serving sizes and caffeine content vary. The US FDA lists a typical range of 113 to 247 milligrams for 12 fluid ounces, about 355 millilitres, of regular brewed coffee. Those figures are reference estimates, not measurements of every drink sold locally.[4]
People also break caffeine down at different speeds, partly because of genetic differences. Medications and certain health conditions can affect sensitivity. Your friend’s ability to drink coffee and sleep easily does not establish what works for you.[1][4]
A randomized trial published in the April 2025 issue of SLEEP tested 100- and 400-milligram doses at different intervals before bedtime. The larger dose disrupted aspects of sleep even when taken twelve hours beforehand. The smaller dose produced no statistically significant sleep effects at the tested intervals.[5]
However, the trial included only 23 young adult men with moderate habitual caffeine intake. It tested single doses under specific conditions. Its results do not establish a universally safe four-hour window or a twelve-hour rule for everyone.[5]
The FDA cites 400 milligrams daily as an amount not generally associated with negative effects for most adults. That is neither a target nor a guarantee of undisturbed sleep. It is adult guidance, not a recommendation for children or teens.[4]
Working nights? Count back from your intended sleep
If you plan to sleep after a night shift, your relevant bedtime is in the morning. A coffee near the end of work may still affect that sleep.[2]
NIOSH advises workers who use caffeine to take it near the beginning of the shift and stop several hours before it ends, allowing for individual sensitivity. NIH guidance similarly recommends limiting caffeine to the first part of a shift.[3][6]
For someone planning to sleep at 8 AM, a 6 AM coffee is close to bedtime, even though it looks like an ordinary morning drink. The same logic applies to students and evening workers: consider when you actually intend to rest.
Protect that sleep period, too. Light-blocking curtains and fewer noise distractions can help create a suitable setting for daytime sleep.[6]
Small adjustments worth considering
Start by noting when you consume caffeine, approximately how much, and when you intend to sleep. If sleep is difficult, consider moving your last serving earlier or choosing a smaller amount, then observe how you respond.[2][3][4]
Count other sources. Tea, energy drinks, cola, and chocolate contain caffeine. Some pain relievers, cold medicines, and medicines for alertness contain it too. Check labels and ask a pharmacist about medicines rather than changing prescribed treatment yourself.[7]
Decaf can reduce caffeine intake, but it is not caffeine-free. The FDA says an eight-fluid-ounce cup typically contains two to fifteen milligrams. If reducing a daily caffeine habit, do so gradually to limit unpleasant withdrawal symptoms.[4]
Give yourself time to wind down and keep your sleeping space dark, quiet, and comfortable. The Philippines’ National Nutrition Council also advises watching caffeine intake and maintaining a restful sleep environment.[6][9]
You do not necessarily need to give up coffee. Adjusting its amount or timing may be enough to help. If sleep problems persist or regularly affect daily life, seek professional advice rather than assuming your last cup is the whole explanation.[6][9]
Sources
- NIH News in Health. Tired or Wired? Caffeine and Your Brain. October 2020.
- CDC/NIOSH. Sleep Aids and Stimulants: Caffeine. Reviewed March 31, 2020.
- CDC/NIOSH. Prepare for Sleep. Reviewed March 31, 2020.
- US FDA. Spilling the Beans: How Much Caffeine Is Too Much?.
- Gardiner and colleagues. Dose and timing effects of caffeine on subsequent sleep: a randomized clinical crossover trial. SLEEP, April 2025 issue. DOI: 10.1093/sleep/zsae230.
- NIH/NHLBI. Sleep Deprivation and Deficiency: Healthy Sleep Habits. Updated March 24, 2022.
- NIH/National Library of Medicine, MedlinePlus. Caffeine. Updated September 8, 2021.
- NIH/NHLBI. Insomnia: Causes and Risk Factors.
- Philippine National Nutrition Council. Nutrition and Sleep. No publication date displayed.













