I had complete sleep inversion for about 6 months at one stage. Supremely infuriating! Attacked it with 3 things:
Light therapy early in the day.
Melatonin in the evening and at night.
Rest, rest, rest.
I don't know which, if any, of the above made the difference but eventually my body clock...