The pineal gland or epiphysis is located in the diencephalon and releases hormones that alter the state of wakefulness and sleep.