Research has shown that lack of sleep either due to stress or performing a task affects the brain. It affects the cerebrum and reduces memory and learning. other habits .