According to "common knowledge", morning/afternoon exercise is "good" for sleep (in the long run) and caffeine is bad (less so in the morning). However, both of these stimulate the brain; exercise gives a "runners high".
Does a long term caffeine intervention affect sleep? I can't seem to find a study on this topic. For exercise, we have this study, which references a few others (afternoon intervention): http://www.ncbi.nlm.nih.gov/pubmed/23946713
Why does it take several days/weeks for exercise to improve sleep? How/why does caffeine differ from exercise as a long-term "morning sleep stimulant"? One possible reason: Caffeine has a relatively long half-life of 4-6 hours, which means that up to 1/4 will still be there at night.