An arylalkylamine is a secondary or tertiary amine which has both an alkyl and an aryl group connected to the nitrogen atom.
Melatonin is made from serotonin (5-hydroxytryptamine) and N-acetylserotonin in the pineal gland by arylalkylamine N-acetyltransferase and hydroxyindole-O-methyltransferase.
Melatonin is made from the amino acid tryptophan. Tryptophan is an essential amino acid, that is, the body cannot make it; we need to get it through the foods we eat. Tryptophan is found in a wide variety of foods. As we consume tryptophan during the day, the body converts it into serotonin, an important brain chemical involved with mood. Serotonin, in turn, is converted into melatonin. This conversion occurs most efficiently at night.