I know that for me it was an undefined anxiety. I work in a job that goes through very busy cycles. So every so often I would get to a spot where depression and exhaustion would let me sleep for many hours. Then, when I caught up on my sleep, depression and anxiety would keep me up most of the rest of the night.
I am by no means done. However, since starting therapy and some steps of transition I sleep much better. Find I can wake up. Things are more balanced.
Don't know if that answers your questions but...
With warmth,
Joanna