Stage 3 and 4 are the most important stages of sleep, and take the longest to get to as they come at the end of the 90 minutes cycle. During these stages the body releases growth and repair hormones to heal the body, repair the neurological system, and, in children, help in growth.
Sleep is necessary for your nervous systems to work properly. Too little sleep can make you drowsy and unable to concentrate. It also leads to impaired memory and physical performance and reduced ability to carry out math calculations. After a long period of time, hallucinations and mood swings may develop. Many scientists believe sleep gives neurons used while we are awake a chance to shut down and repair themselves. Without sleep, neurons may become depleted in energy or polluted with byproducts of normal cellular activities that they begin to malfunction. Sleep also may give the brain a chance to exercise important neuronal connections that might otherwise deteriorate from lack of activity.
After 36-48 hours severe mental affects kick in such as hallucinations, some effects similar to dementia, loss of memory, paranoia, and suicidal feelings. After 8 days brain damage can begin to occur, causing one's personality to change permanently. 11 days is the longest anyone has ever stayed awake, and this was done by Randy Gardner in 1965.
It is still uncertain whether or not sleep deprivation causes death in humans, though after two weeks of no sleep rats will die. It is safe to say, that long term lack of sleep causes the death of neurons which over time can render a person brain-dead. There is no known secretion released by the brain that causes death, and you are much more likely to die from an accident caused by your lack of sleep than to die of the brain damage caused.