Methyltransferase which catalyzes the transfer of a methyl group onto N-acetylserotonin, producing melatonin (N-acetyl-5-methoxytryptamine). N-acetylserotonin + S-adenosyl-L-methionine = H(+) + melatonin + S-adenosyl-L-homocysteine Aromatic compound metabolism; melatonin biosynthesis; melatonin from serotonin: step 1/2. Homodimer. Expressed at low levels in roots, shoots, leaves, stems and flowers. Belongs to the class I-like SAM-binding methyltransferase superfamily. Cation-independent O-methyltransferase family.