A careful planning of sleeping activities is essential for guaranteeing long operational time to energy constrained IoT devices, given the extremely low energy consumption required during the sleeping mode. Neighbor discovery instead requires nodes to continuously listen to the radio channel to detect potential and unpredictable messages coming from the arrival of new nodes. These two contrasting needs raise a fundamental question: Should a node be active and listen to the channel or sleep and save energy? Hardware manufacturers introduced dedicated low-power circuitry to allow an energy efficient fast duty cycle (Wake-on Radio) or designed to wake up the main processor when special packets are received (Wake-up Radio). In this work, we propose a novel analytic model optimizing the number of discovered peers for a given energy budget. Our theoretical study demonstrates the existence of an optimum duty cycle in a wide range of operating environments. We designed an adaptive algorithm that dynamically tracks the optimum even in non-stationary conditions, only using local device estimations, therefore allowing nodes to optimize their own duty cycle. Nodes globally converge to a system-wide optimum of a minimal network discovery energy cost. © 2002-2012 IEEE.