Coffee may affect the quality and brain activity during sleep, even when a person does not experience serious difficulties falling asleep. This shows a new systematic scientific review that draws attention to the more subtle effects of caffeine on deep sleep.
The study was published in April 2026 in the scientific journal Nutrients by James Chmel from the University of Szczecin and Prof. Donata Kurpas from the Medical University of Wrocław. Instead of a new clinical trial, the scientists conducted a systematic analysis of 32 previous studies that used electroencephalography (EEG) to track brain activity during sleep.
The result that appeared most consistently across the different experiments was a reduction in low-frequency activity during NREM sleep, especially the so-called slow-wave activity. In parallel,caffeine often increases faster brain activity, characteristic of a lighter and more alert state.
This is important because the standard question “How many hours did I sleep?“ does not fully describe the quality of sleep. EEG allows us to determine how brain activity changes during its different phases.
“EEG allows us to see not only whether a person is sleeping, but also how their brain is sleeping“, explains Prof. Donata Kurpas. She says quantitative analysis can detect more subtle changes, including a decline in slow-wave activity, which is associated with the depth and restorative processes of sleep.
Caffeine can last hours after your last coffee
The mechanism is well known. Caffeine primarily blocks adenosine A1 and A2A receptors in the brain. Adenosine builds up during the day and is one of the main chemical signals that the body uses to increase the pressure to sleep. When its action is temporarily blocked, a person feels more alert.
The problem is that caffeine doesn't wear off quickly after your last sip. It usually takes about 4-6 hours to metabolize half of the amount you consume, although the rate varies greatly between individuals.
Therefore, coffee, energy drinks, tea, cola, chocolate or caffeine supplements consumed in the second half of the day can also have an impact in the evening.
How many hours before bedtime is it a good idea to stop drinking coffee?
Here, the dose is crucial. A randomized clinical trial found that 100 mg of caffeine, approximately the amount in a cup of coffee, did not cause statistically significant changes in objective or subjective sleep even when consumed four hours before bedtime. At a dose of 400 mg, the picture is different: changes in sleep onset and sleep structure are observed when taken up to 12 hours before bedtime, and more pronounced sleep fragmentation is found up to eight hours before it.
A larger meta-analysis of 24 studies comes to a similar conclusion. On average, caffeine reduces total sleep time by about 45 minutes, reduces sleep efficiency by 7%, and increases the time to fall asleep by about nine minutes. The amount of deep sleep is also reduced. The authors calculate that a standard coffee with about 107 mg of caffeine should be drunk approximately nine hours before bedtime, if the goal is to minimize the risk of sleep shortening.
However, this is not a universal “clock“. Caffeine sensitivity varies widely and is influenced by age, genetics, habits, medications, and the rate at which the body metabolizes the substance. Earlier systematic data, for example, have shown that older people's sleep may be more sensitive to caffeine.
We may not realize how much it affects us
One of the most interesting findings is the discrepancy between subjective perception and measured changes. A person may think that caffeine "doesn't affect" them because they fall asleep relatively easily, but objective measurements sometimes show a different structure or greater fragmentation of sleep.
This does not mean that eight hours of sleep after coffee are "useless," as a more categorical interpretation of the results would suggest. It is more accurate to say that sleep duration alone does not tell the whole story. Caffeine can alter some of the electrophysiological characteristics of sleep without a person necessarily realizing it.
This is where the familiar cycle can occur: poor or short sleep leads to more caffeine to maintain alertness the next day, and later or higher intake can in turn make the next night difficult.
For most healthy adults, the U.S. Food and Drug Administration lists up to 400 mg of caffeine per day as an amount that is not usually associated with adverse effects. However, this is a general guideline for safe daily intake, not a guarantee that 400 mg will not disrupt sleep.
The practical conclusion from the accumulated evidence is more moderate than the statement that coffee should be stopped in the morning. The larger the dose and the closer to bedtime it is consumed, the more likely it is that caffeine will affect sleep. For people who have difficulty falling asleep, wake up frequently, or do not feel refreshed in the morning, reducing caffeine in the afternoon is one of the easiest variables to test.