Insomnia Support Group
Insomnia is a symptom, rather than a disease, and is characterized by inadequate quantity or quality of sleep. People with insomnia complain of difficulty falling or staying asleep, which results in significant impairment of daytime functioning. Insomnia is categorized as transient (shorter than one week), short-term (one to three weeks) or chronic (longer than three...

My take is beware of any substance that artificially forces sleep, including melatonin, as sleeping pills typically only treat the symptom. The key is to find out what is disrupting sleep in the first place and treat that.
The gold standard is CBT sleep training programs. You might ask your doc about using one of those. They are completely substance free and represent a permanent solution. Much good info online if you're the self-help type, or ask your doc for a referral. Good luck.