The deep secret of the brain is that not only the spinal cord but the entire central nervous system works this way: internally generated activity is modulated by sensory input. In this view, the difference between being awake and being asleep is merely that the data coming in from the eyes anchors the perception.
David Eagleman (2011). “Incognito: The Secret Lives of the Brain”, p.55, Vintage