Evolution is like DFS depth first search, it isnt looking for an optimal way optimally its just going down a branch until it finds a satisfactory solution.
Sleep according to sleep scientist matthew walker, isnt what it seems. If i remember correctly theres even more brain activity and it serves certain goals like behavior refinement, among other things not just refreshing yourself. There might not be more benefit by more sleep.