Final answer:
The pineal gland is part of the diencephalon, located in the epithalamus, which is posterior to the thalamus. It secretes melatonin, regulating sleep-wake cycles.
Step-by-step explanation:
The pineal gland is part of the diencephalon region of the brain, specifically located in a section known as the epithalamus, which is inferior and posterior to the thalamus. This tiny endocrine gland is responsible for producing and secreting the hormone melatonin, which regulates sleep-wake cycles and adjusts to light-dark patterns, affecting processes like jet lag. The production of melatonin is increased in low light, leading to drowsiness, and is connected to light detection through the retina and the suprachiasmatic nucleus (SCN).