In many sensor network applications the major traffic pattern consists of data collected from several source nodes to a sink through a unidirectional tree. In this paper, we propose DMAC, an energy efficient and low latency MAC that is designed and optimized for such data gathering trees in wireless sensor networks. We first show that previously proposed MAC protocols for sensor networks that utilize activation/sleep duty cycles suffer from a data forwarding interruption problem, whereby not all nodes on a multihop path to the sink are notified of data delivery in progress, resulting in significant sleep delay. DMAC is designed to solve the interruption problem and allow continuous packet forwarding by giving the sleep schedule of a node an offset that depends upon its depth on the tree. DMAC also adjusts the duty cycles adaptively according to the traf.c load in the network. We further propose a data prediction mechanism and the use of more-to-send (MTS) packets in order to alleviate problems pertaining to channel contention and collisions. Our simulation results show that by exploiting the application-specific structure of data gathering trees in sensor networks, DMAC provides significant energy savings and latency reduction while ensuring high data reliability.