Melatonin, also known as N-acetyl-5-methoxy tryptamine, is a hormone that is produced by the pineal gland in animals and regulates sleep and wakefulness. Melatonin is also produced in plants where it functions as a first line of defense against oxidative stress.