In this paper cognition is exploited to maximize energy efficiency while guaranteeing quality of service (QoS) constraints in TDM PONs with time-variable network conditions. In the proposed solution the previously introduced cooperative cyclic sleep scheme exploits runtime computation and adaptation to network conditions of the sleep time. Simulation results show the potentials of the proposed approach in maximizing energy savings while guaranteeing average delay constraints when applied to limited buffer ONUs.