Melatonin is a hormone primarily released by the pineal gland that regulates the sleep–wake cycle. As a dietary supplement, it is often used for the short-term treatment of insomnia, such as from jet lag or shift work, and is typically taken by mouth. Evidence of its benefit for this use, however, is not strong. A 2017 review found that sleep onset occurred six minutes faster with use, but found no change in total time asleep. The melatonin receptor agonist medication ramelteon may work as well as melatonin supplements, at greater cost but with different adverse effects, for some sleep conditions.Side effects from melatonin supplements are minimal at low doses for short durations. They may include somnolence (sleepiness), headaches, nausea, diarrhea, abnormal dreams, irritability, nervousness, restlessness, insomnia, anxiety, migraine, lethargy, psychomotor hyperactivity, dizziness, hypertension, abdominal pain, heartburn, mouth ulcers, dry mouth, hyperbilirubinaemia, dermatitis, night sweats, pruritus, rash, dry skin, pain in the extremities, symptoms of menopause, chest pain, glycosuria (sugar in the urine), proteinuria (protein in the urine), abnormal liver function tests, increased weight, tiredness, mood swings, aggression and feeling hungover. Its use is not recommended during pregnancy or breastfeeding or for those with liver disease.In animals (including humans), melatonin is involved in synchronizing the circadian rhythm, including sleep–wake timing, blood pressure regulation, and seasonal reproduction. Many of its effects are through activation of the melatonin receptors, while others are due to its role as an antioxidant.