I had sleeping issues on and off and tried various supplements.
Melatonin worked to help me fall asleep quickly but didn't help me staying asleep all night long. I'd often wake up around 3:00 or 4:00 AM and be unable to get back to sleep.
What worked best for me was the supplement 5HTP. It's a naturally occurring amino acid that promotes a positive mood and helps with sleep. It's non-addictive and you can take it for a period of time. I take 100 mg, but you can take higher dose. Note, it's better to take it for several weeks as it takes a while for it to work and it's not used like, say, a one-off sleeping pill that will put you to sleep immediately. It's cheap and safe and worth trying if you have sleep issues. I take it shortly before bed and combine it with 100 mg of Magnesium Glycinate. Together, they help me get a decent night's sleep.