Melatonin is a hormone produced by the pineal gland in the brain that plays a crucial role in regulating the body's sleep-wake cycle, also known as the circadian rhythm. It is closely tied to consciousness, sleep, and various sleep-related disorders.