After tracking my sleep for a year, I find it fascinating that I can drink coffee or an energy drink an hour or two before sleeping and it has a negligible effect upon my heart rate or sleeping patterns. But if I have a single unit of alcohol, my heart rate remains elevated for most of the night and I tend not to make it all the way to the morning without waking up at some point.