Occasionally it is said that the reason for sleep is not known. What follows is a proposed model explaining the reason for sleep.
A few days ago my wife had a nose bleed. The doctor cauterized her nose and inserted a balloon to maintain pressure on the spot for a couple days. The balloon apparently also blocked air flow to the olfactory nerves at the top of the nose. Several days later when the balloon was removed and the nerves unblocked, she detected smells that I did not.
Perhaps sleep serves a similar function, resetting and resensitizing our senses and nervous processing.
A analogous process occurs in my computer. After extended operation, the computer code occasionally becomes corrupt and begins to show evidence in the form of misunderstood input, incorrect analysis, or inappropriate display of output. Rebooting the operating system (in the old days) or quitting and relaunching the program (using the current operating system: OS-X) resets the computer to again function correctly.
The surface electronics of nerves may behave similarly to computer electronics: After an extended period awake I note evidence that has been described as
rummy (akin to drunk with alcoholic beverage) where either input, analysis, or output deteriorates noticeably. Getting a
good night's sleep may shut down the system or block the input long enough (as in the case of my wife's nose) for the system to reset.
The time required for resetting each part of the system may be different. Sight may be restored with a short nap, while the sense of smell could require several days off line to totally reset.