A few things helped me. First, I started logging my sleep. It helped me analyze how much sleep I was really getting. Second, this sounds simplistic, but I first fixed the waking time. Irrespective of the time I sleep, I started waking up at the exact same time everyday. And finally, I stopping using all gadgets at least for 2 hours before my sleep time.
I see a marked improvement in the quality of my sleep these days. Hope you beat your problem too.