For many of us, coffee is an indispensable part of our daily routine, available to give us that much boost of energy we need in the morning or in the evening.

According to research, you should avoid consuming caffeine around 2am or at least seven hours before going to sleep, as it can negatively affect your sleep.

One study, published in the Journal of Clinical Sleep Medicine, found that consuming caffeine six hours before bed still affected sleep, even though they no longer felt the effects of caffeine.

Although the study participants were able to fall asleep without a problem. Sleep researchers found that caffeine consumed immediately before bed, three hours before bed, and up to six hours before bed all resulted in disruptive effects on sleep.

According to studies done by researchers in Britain and the US and published in the journal Science Translational Medicine, drinking the equivalent of a double espresso three hours before bed can turn your body clock back almost an hour. This is linked to heart disease and neurodegenerative disorders such as Alzheimer's.

It's not just about caffeine found in coffee, but also about soda or energy drinks.

The most useful time to consume coffee is 10am. In terms of overall consumption, the Mayo Clinic recommends maintaining caffeine intake at 400mg daily, or approximately four cups of coffee.