Passive Optical access Networks (PONs) are currently the major contributor to the energy consumption budget of fixed optical networks. In PON, the largest part of the energy consumption is due to the equipments at the customer premises. This paper proposes a method for maximizing energy savings while providing services with delay guarantees (i.e., frame delivery time and frame delay variation). The method combines service-based variable sleep period and a queueing theory model to compute the optimal sleep time. Simulation results prove the effectiveness of the method for a Poisson frame arrival process.