Caffeine has an average half-life of five to seven hours. Lets say that you have a cup of coffee after your evening dinner, around 7:30 p.m. This means that by 1:30 a.m., 50 percent of that caffeine may still be active and circulating throughout your brain tissue. In other words, by 1:30 a.m., youre only halfway to completing the job of cleansing your brain of the caffeine you drank after dinner.
Why We Sleep by Matthew Walker