Have you tried smaller doses of melatonin? Can be hard to do as the smallest dosage I usually see at stores is still much higher than what I’ve found to be my max dose
I buy 1 mg tablets and even that is too much for me. I use a razor blade to cut them into 1/6th pieces.
Takes less than 30 minutes to kick in.
A lot of other comments here about poor sleep I believe are the result of drinking caffeinated products past 1 PM.