Sensor network MAC protocols usually employ periodic sleep and wakeup, achieving low duty-cycle to save energy and to increase the lifetime of battery-powered sensor devices. However, existing protocols require all the sensor nodes to operate on the same static schedule, waking up all the nodes at the same fixed interval periodically. This paper proposes a new media access control protocol called AMAC that can achieve significant energy savings by dynamically changing the schedule of each node depending on the traffic. In AMAC, each node can adjust the duration of the periodic interval as well as the duration of the active period depending on the traffic Thus, busy nodes can operate with a high duty-cycle while idle nodes can operate with a low duty-cycle at the same time, achieving both low-energy and high-performance. The results of our detailed simulations confirm that AMAC can reduce the average energy consumption by a factor of up to 6.8 compared to an existing fixed duty-cycle MAC protocol while it can also improve the network performance for burst traffic patterns.