Some researchers believe that dreaming is what happens when sensory input to the brain is greatly diminished: the brain then ‘freewheels’, synapses firing more or less at random, and the brain tries to make sense of the resultant stream of images.
James David Lewis-Williams, The Mind in the Cave: Consciousness and the Origins of Art
consciousness, upper-palaeolithic-art