Optimizing the energy consumption in wireless sensor networks has recently become the most important performance objective. We assume the sensor network model in which sensors can interchange idle and active modes. Given monitoring regions, battery life and energy consumption rate for each sensor, we formulate the problem of maximizing sensor network lifetime, i.e., time during which the monitored area is (partially or fully) covered. Our contributions include (1) an efficient data structure to represent the monitored area with at most n/sup 2/ points guaranteeing the full coverage which is superior to the previously used approach based on grid points, (2) efficient provably good centralized algorithms for sensor monitoring schedule maximizing the total lifetime including (1+ln(1-q)/sup -1/)-approximation algorithm for the case when a q-portion of the monitored area is required to cover, e.g., for the 90% area coverage our schedule guarantees to be at most 3.3 times shorter than the optimum, (4) a family of efficient distributed protocols with trade-off between communication and monitoring power consumption, (5) extensive experimental study of the proposed algorithms showing significant advantage in quality, scalability and flexibility.