Melatonin is synthesized from L‐tryptophan by four enzymatic steps and with the BH4 biosynthesis and regeneration pathways to supply the BH4 cofactor.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5066760/
(Questions work in search engines too, anon)