I try not to fight it much without having a valid reason - like a tight deadline. And in those instances, coffee will generally put me to sleep within an hour. And if I fight it for longer than, say, a couple weeks, I end up sleep deprived. The only time coffee "works" for me is when I'm not stressed, which is to say not when I "need" it.
That wasn't the case in my twenties, though. I could work on something for 36 hours, sleep for 4-6 and do it all over again for a couple months at a time before I'd start losing my way. I was also drinking a LOT more alcohol back then.
Melatonin has helped me to keep a bit of a balance though (not that you need one, it depends on your life :)), living half in this real world and half in mine has helped me order life a bit and i'm no longer constantly cycling around my sleeping. It's well recommended for circadium disorders.
But I'm lucky to have a job I can start at 11am, even if that's tricky. But with the use of melatonin and loads of other things I don't have to fight myself as much as I used to and can generally get to sleep before 2am(sorry not 1am as above, that would be a miracle). Acceptance definitely helps :).
Haha, I used to do the same with working! I remember once after about 2 weeks straight working 24-40 hour stints I turned to my friend and said "I think i've forgotten how to sleep.". I realised then that sleep takes concentration and if I was overtired I don't have the concentration to get to sleep.
On the other side of the same coin, I've learned not to bother trying if I'm not ready to sleep, and so when I do go to bed, it's because it's time. My wife gets annoyed with my ability to fall asleep about around the moment my head hits the pillow, as it takes her at least 30 minutes.
As for the job schedule, I recently rejoined the freelance world and I'm elated by the idea of going back to MY normal schedule. The company I was working with gave me plenty of [relative] slack because I was productive, but there were still a few too many meetings that kept me on a schedule that didn't really jive. I think that very schedule inadvertently contributed a great deal to my reasons for leaving.