Maybe get your niacin level checked?
If you are low in niacin your body will use tryptophan to make it.
And tryptophan is also used to make serotonin. So low niacin could mean low tryptophan which could mean low serotonin which could mean low melatonin.
I'm not on APs, I spend time in nootropics communities.
So definitely check with your doctor.
Might also look in to n-acetyl-cysteine, however I'd put more stock in the niacin angle.