I couldn't take melatonin. The days after I took it I would have unbearable migraines. If I were you, I would find out the unerlying issue with your sleeplessness. (ie. too much caffeine, stress, changes in exercise or foods).
Only sleep medicine that was "OK" to me was Lunesta, even that made...