Depends on how much you drink before you go to sleep, I think.
I used to drink coffee right before sleep. To tell you the truth, I agree with you. There is some correlation between coffee and the nature of your sleep. I remember dreaming about having more energy and running.
Creepy stuff, I say!