Caffeine can stimulate your body and mind. It can speed up brain waves and raise your heart rate and blood pressure. It can have the effect of waking you up and making you more alert. And the effects of caffeine can last for 6 hours or more. So it’s best to avoid products containing caffeine for at least 6 hours before you go to sleep. This includes caffeinated coffee, soda, and energy drinks. It also includes certain kinds of tea, like black tea and green tea. And even certain foods, like chocolate.