...i wrote a long explanation here, but actually, it's pretty simple when you get down to it. depression is mostly related to the neurotransmitters dopamine, serotonin, and norepinephrine. a decrease in serotonin has to do with stress and anxiety, as does an increase in norepinephrine. being stressed and anxious makes it hard to sleep because norepinephrine is in charge of giving your body arousal and energy (for the most part), so it's hard to completely shut down the body and sleep with too much of it, especially since norepinephrine needs to be low (usually) to allow sleep, and it decreases as you sleep.
so i guess it wasn't that complicated after all, and i don't get to show off. lame. : P