Once you get into a pattern of staying awake for several hours in the middle of the night, it's really hard to break it, and you create anxiety about it, so that decreases your chance of getting back to sleep anytime soon. If you take melatonin, you need to take magnesium and calcium with it...