We consider transmission scheduling by medium access control (MAC) protocols for energy limited wireless sensor networks (WSN) in order to maximize the network lifetime. Time-varying Opportunistic Protocol (TOP) for maximizing the network lifetime is proposed. By executing TOP each sensor exploits local channel state information (CSI) and local residual energy information (REI). TOP implements opportunistic strategy in terms of favoring sensors with better channels when the network is young, while less opportunistic and more conservative strategy in terms of prioritizing sensors with higher residual energy when the network is old. TOP significantly simplifies the implementation of carrier sensing as compared to other distributed MAC protocols. Simulation results show that TOP achieves significant performance gains over other distributed MAC protocols.