I did a quick search and found the Delayed Sleep Phase Syndrome topic [Delayed Sleep Phase Syndrome)
now other ways to adjust your sleeping rhythm…
more exercise during the day
have a routine for going to bed
never take a nap during the day to catch up on sleep
allow yourself to get used to not taking the melatonin ( may be you got a little too dependent on it?)
have a look at the big insomnia topic, it will give you more advice. [Insomnia - Can't sleep!)