This content was created by the National Sleep Foundation

If you’re not getting enough sleep at night, consider what you’re drinking during the day. While coffee and alcohol are often blamed for their negative impact on sleep, there’s another drink that has been linked with poor sleep: soda.

People who drink a lot of sugary, caffeinated drinks tend to sleep for five or fewer hours a night—far less than would be ideal at any age. While it’s unclear whether the drinks lead to sleeplessness or under-sleeping causes people to reach for sugary sodas, there is an association between the two. There are a number of reasons that soda doesn’t do you any favors when it comes to healthy sleep.

The caffeine can keep you up.

Starting with the most obvious culprit, caffeine is a well-known stimulant that blocks chemicals in the brain that make you feel sleepy, temporarily helping you to feel more alert. It’s safe in moderation, but can stay in your bloodstream for about six hours. If you have a soda with dinner, you may well still feel the effects at bedtime.         

It may worsen nighttime heartburn symptoms.

The carbonation in soft drinks can lead to bloating and stomach pressure that contributes to heartburn, or GERD. And GERD has a tendency to flare up at night and make you more likely to suffer from sleep problems like insomnia, daytime sleepiness, and restless legs syndrome.

It’s a contributor to obesity.

Sugar-sweetened drinks like soda are the number one source of sugar in the American diet, making up nearly half of the added sugars that Americans consume. A 20-ounce bottle of regular cola packs about 240 calories from sugar. Yet, paradoxically, even without containing any calories, diet soda can contribute to weight gain, too. That’s bad news for sleep quality, since obesity raises the risk of sleep apnea and more sleep loss, creating a vicious cycle.

But here’s the good news: Cutting out this pesky beverage and replacing it with, say, water or seltzer can leave you feeling hydrated and refreshed—without hurting your sleep.