Consider the following: in the chronic and unforgiving competition for brain real estate, the visual system has a unique problem to deal with. Because of the rotation of the planet, the brain is cast into darkness for an average of twelve hours every cycle. We already know that sensory deprivation triggers neighboring territories to take over. So how does the visual system deal with this unfair disadvantage?

By keeping the occipital cortex active during the night.

We suggest that dreaming exists to keep the visual cortex from being taken over by neighboring brain areas. After all, the rotation of the planet does not affect anything about your ability to touch, hear, taste, or smell; only vision suffers in the dark. As a result, the visual cortex finds itself in danger every night of takeover by the other senses. And given the startling rapidity with which changes in territory can happen, the threat is formidable. Dreams are the means by which the visual cortex prevents takeover.

David Eagleman