There are some problems with Melatonin (as supplied) - you don't really know how much (if any) you're getting. Investigators found that quality control was very poor and some brands contained very little melatonin. (I can't find it now, but it was something like Consumer Reports or similar?) It's a prescription only med in some places (UK) so you might not be able to get it. But it is "remarkably effective"[1] for je…
I think melatonin is a better drug for correcting problems with sleep cycles which can include jet lag, changes in season and the like but there's plenty you can do help your sleep quality without drugs.
Here's a great article (about Huntington's disease but applies to everyone - it really helped me) based on a published paper in Experimental Neurology: