This paper presents an integer linear programming model devoted to optimize the energy consumption efficiency in heterogeneous wireless sensor networks. This model is based upon a schedule of sensor allocation plans in multiple time intervals subject to coverage and connectivity constraints. By turning off specifics sets of redundant sensors in each time interval, it is possible to reduce the total energy consumption in the network and, at the same time, avoid partitioning the whole network by losing some strategic sensors too prematurely. Since the network is heterogeneous, sensors can sense different phenomena from different demand points, with different sample rates. By resorting to this model, it is possible to provide extra lifetime to heterogeneous wireless sensor networks, reducing their setup and maintenance costs. This is an important issue to be considered when deploying sensor devices in hostile and inaccessible environments.