Some of the more memorable experiences with trance I had while on Adderall and that doesn't exactly put you to sleep. I suppose the heightened focus aspect of it helped.
I don't remember intentionally trying caffeine but iirc I've had trouble being too jittery from it