Sleep is necessary for rest, first of all, for the brain, which consumes the most energy, and only during sleep forms the neural connections necessary to memorize the information received in long-term memory. Without rest, the brain is quickly depleted and the person becomes a stupid, empty-headed sclerotic vegetable. And after two weeks of intensive work without sufficient rest, a nervous breakdown occurs and the person falls into a dumbass, so the session does not last more than two weeks.
Sleep is not a "method of restoring energy", it is a physiological need. Energy recovery is calorie intake. The most effective way to restore energy is to eat nuts, lard or something (high-calorie food).