When I used to have trouble with this one of the biggest problems was how mad it would make me. I'd be exhausted all day and ready to fall asleep, but when head meets pillow I was wide awake again. Then I'd get angry, and that would just wake me up even more, and I'd be back on the bad cycle again.
I cannot stress enough how much I recommend something like Ambien. I took it regularly for maybe a month, it reset my sleep cycle, and now I'm back to pretty normal sleep times and rarely take it anymore. Don't suffer from this if you don't have to. Talk to your doctor.