I use melatonin to recover from jet lag. It's not to _get_ to sleep, it's to stay asleep when my body normally thinks it should be getting up.
If you can find one, I'd recommend* an S+ by ResMed. It uses radar to track your sleep and can discern what phase of sleep you're in. It tracks how long it takes you to go to sleep and can offer specific hints to address issues you might be having. The app hasn't been kept up to date, but if you've got an older iOS 8.x device you're not going to upgrade that would pair well with it.
*Disclaimer: I worked at ResMed on the S+. I no longer work at ResMed but I still like my S+.
I've found that simple sleep hygiene habits (no blue light exposure 30 mins before, taking a shower, etc) facilitates better sleep than melatonin.