Do you have ADHD? I do, and I can drink caffeine and go straight to bed, and it does help a little bit with focus (Adderall helps a lot more, of course).
Stimulants tend to calm the ADHD mind, and can stop racing thoughts that make it harder to sleep.