Energy-efficiency is key to meet lifetime requirements of Wireless Sensor Networks (WSN) applications. Today's run-time platforms and development environments leave it to the application developer to manage power consumption. For best results, the characteristics of the individual hardware platforms must be well understood and minutely directed. An Operating System (OS) with suitable programming abstractions can micro-manage power consumption of resources. We demonstrate with the Mote Runner platform how the inherent overhead of managed application code is compensated for by a platform-independent communication API together with sleep optimizations. The proposed abstractions and optimizations can be applied to other modern sensor network platforms. To quantify the effectiveness of our approach, we measured the energy efficiency of a real-world WSN application using a custom TDMA communication protocol fully implemented on both Mote Runner and TinyOS. Mote Runner's power management and sleep phase optimizations outperforms TinyOS in our test application for duty cycles below 10% on the Iris hardware. © 2011 IEEE.