Pineal gland in the brain. Computer artwork of a person’s head showing the brain inside. The highlighted area (centre) shows the pineal gland. The pineal gland is a small endocrine gland located near to the centre of the brain, between the two hemispheres. It produces melatonin, a hormone that affects the modulation of wake/sleep patterns and photoperiodic (seasonal) functions.