The pineal gland’s primary function is to regulate the circadian rhythm, including feeling tired and wakefulness. It does this through the secretion of melatonin. It also may play a role in several systems, including the cardiovascular system and sexual hormones.