However the most important brain chemical that is associated with sleep is melatonin – a hormone which is produced by the pineal gland. As daylight fades and night falls, levels of melatonin increase, giving the body the signal that it’s time to sleep. It is produced in the body from protein foods, and is fundamental to achieving good sleep and feeling rested and refreshed. We’ll look at melatonin in depth in step 4.