I use melatonin on and off, and it is helpful. Just be careful: It's pretty powerful stuff for a supplement, so don't think you can pop unlimited amounts with no side effects. My psychiatrist considers melatonin on the borderline of being a drug (heck, many of the prescription drugs we take start with potent natural plants or herbs, like yohimbe) and may end up being regulated one of these days.
Anyway: About 1.5 mg is a good dose, but you can try less. I was told to never take more than 3 mg. Yes, melatonin sometimes gives me a headache. And also, you can wake up pretty groggy if you take too much of it.