Pineal Gland Function. The pineal gland has several critical functions including secretion of melatonin the hormone that causes sleepiness and regulation of certain endocrine functions. The gland also helps the body to convert signals from the nervous system to signals in the endocrine system.