Pierre I practice the habits that Topo said above and I sleep well. Also I would suggest not having a tv in your bedroom or other distractions.
Once in awhile I'll use a tylenol pm but by no means make it a habit.

My insomnia was/is a symptom of depression, so prescriptions like Ambien won't address why you're having problems sleeping. Plus, it's easy to become dependent on them. Many shrinks can prescribe medication (perhaps more than one pill, working together) to combat the insomnia issue and the underlying issue that's causing the insomnia.

Gotta watch it, though. All medications come with risks and side-effects and WEIGHT GAIN is almost always at the top of the list (which, ironically, can compound your depression).

You can get melatonin over the counter. Take 3 milligrams an hour before bed. Eat healthy, exercise and if you have faith pray for a specific period a day, if not meditate. I don't believe in god but prayer can do the same as meditating which is put you in a hyper relaxed (oxymoron) state.