The redundant design of communication networks leads to under-utilization of idle devices, which have been reported to consume a significant portion of energy. Thus, it demands a sleep scheduling scheme to improve energy efficiency of communication networks. In this paper, we formulate the optimal sleep scheduling problem from the perspective of routing, which aggregates the traffic loads to fewer active devices by route selection and put the idle devices into sleep to save energy. We then design a genetic algorithm to find out near-optimal sleep scheduling solution, which facilitates the implementation in software-defined networks. Simulation results over network instants from the online database survivable network design library show that our proposed genetic sleep scheduling algorithm outperforms the existing schemes in saving energy.