Melatonin is a chemical that is produced and secreted in a gradual way at night to induce sleep. I don't think that you can test for it as it is only produced at night.

If it is trigeminal neuralgia then I have no idea what the link between that and melatonin is.

Good luck with your search