An system-level power management technique for massively distributed wireless microsensor networks is proposed. A power aware sensor node model is introduced which enables the embedded operating system to make transitions to different sleep states based on observed event statistics. The adaptive shutdown policy is based on a stochastic analysis and renders desired energy-quality scalability at the cost of latency and missed events. The notion of algorithmic transformations that improve the energy quality scalability of the data gathering network are also analyzed.