When starting the day in the mornings, many people drink a warm cup with some sort of caffeine to pick them up. The coffee vs. tea debate has persisted for generations. But have you ever stopped to consider the impact your daily drink of choice might have on your precious hours of sleep?

Coffee takes the crown when it comes to the more widely chosen beverage. Its intense aromas and the amount of flavor packed in every sip can make it easy to succumb to a cup or two a day. However, if you sip on that drink, you may overlook a key factor keeping you up at night. Surprisingly, your love affair with coffee could be why you toss and turn all night. Luckily for you, you may not have to give up caffeine just yet, as there is a better alternative.

How Caffeine Affects Your Sleep

In a study conducted by the Sleep Foundation, it was revealed that coffee drinkers get less sleep than tea drinkers. According to the study, people who drink mostly tea are the most likely to get the recommended 7+ hours of sleep.

Even though coffee drinkers seem to know that their daily cup isn’t the best for their sleep habits, 70% say they can’t give it up because of its taste. It helps them feel more alert and awake.

Dr. Abhinav Singh, medical director of the Indiana Sleep Center in Greenwood, Indiana, says the desire for caffeine in America comes from the need to be awake at all times.

“The U.S. is the marketing champion of the world, but we are a chronically sleep-deprived society,” he said. “People are tired of being tired, and caffeine is a legal stimulant that provides that little jolt of energy.”

Although everyone loves a good cup of coffee, caffeine is the root of your sleep issues, he says.

“The average half-life of caffeine is [around] 4 to 6 hours, which may interfere with your sleep. If you find that happening, you’ve got to regulate the quantity and timing of when you drink caffeine,” he said.

However, Dr. Singh says that it’s not solely because of coffee.

“If you find yourself struggling to fall and stay asleep when tired, look at your entire caffeine intake and see how much is getting into your system, then start to reduce or eliminate as much as possible,” he shared. “There are hidden sources of caffeine everywhere, including chocolate, workout drinks, body washes, and even face creams. Caffeine can be used as a friend in the right quantity and timing.”