Coffee, tea, chocolate, and some soft drinks can contain caffeine. NHLBI explains that caffeine is a stimulant and that its effects can last for hours.

The timing detail

NHLBI says caffeine’s effects can last up to eight hours. A caffeinated drink in the late afternoon may make it harder for some people to fall asleep at night, though individual responses vary.

A practical way to use the information

If sleep is a concern, notice the timing and amount of caffeine you consume and discuss persistent difficulty sleeping with a healthcare provider. The source does not prescribe a single cutoff time for everyone.

Where caffeine fits among sleep habits

NHLBI places its caffeine advice within a broader list of steps that may help improve sleep. It suggests avoiding both caffeine and nicotine, noting that each is a stimulant that can interfere with sleep. Its examples of caffeine sources include caffeinated soda, coffee, tea, and chocolate.

The institute also advises going to bed and waking up at the same time every day, and keeping weeknight and weekend schedules within about an hour of each other. It recommends using the hour before bed for quiet time, without intense exercise or bright artificial light such as a TV or computer screen.

Meals, naps, and shift work

Other suggestions include avoiding heavy or large meals within a few hours of bedtime, avoiding alcoholic drinks before bed, spending time outside and being physically active when possible, and keeping the bedroom quiet, cool, and dark.

Napping may boost alertness and performance, according to the page. People who have trouble falling asleep at night may need to limit naps or take them earlier in the afternoon, and NHLBI says adults should nap for no more than 20 minutes.

For shift workers, the institute lists a separate set of strategies. These include limiting caffeine to the first part of a shift, keeping lights bright at work, and reducing sound and light in the bedroom during daytime sleep.

Sources & further reading

These primary sources informed the reporting. Open the original materials for detail and methods.

Beauty News Report may receive compensation from affiliate links or sponsored content. Any paid relationship should be disclosed near the relevant content. See our earnings and affiliate disclosure.