You may want to think twice before ordering that second round of happy hour drinks. A new study, published in the journal Sleep, has found that drinking caffeine within four hours of falling asleep is much less likely to disrupt your slumber than alcohol consumption.

For 14 years, researchers from Florida Atlantic University, Harvard, Emory, and Mississippi Medical Center followed 785 African Americans in one of the world’s largest studies on caffeine, alcohol, and smoking, and their effects on sleep.

Each participant wore a wrist monitor that tracked their sleep for an average of 6.7 nights. They also recorded whether or not they consumed caffeine, alcohol, or nicotine in the four hours before going to bed.

The results showed that caffeine had very little impact on sleep, while nicotine and alcohol greatly affected it. Those who consumed the two within four hours of sleep experienced more sleep interruptions. And those who smoked or vaped before bed got an average of 43 minutes less sleep.

Big meeting tomorrow? Maybe opt for an espresso before bed instead of that nightcap.