My understanding is melatonin should only be used when you are looking to reset your mental clock to sleep a different schedule. Like if you are a solar powered driver and are looking to start driving nights, melatonin will help you make the change quicker.
I’ve gotten good results using a white noise generator app on my phone. I turn it up loud enough to mask any other sounds, and it tends to mask my inner dialog, too. It’s rare that I’m not asleep within five minutes.