Energy consumption is a perennial issue in the design of wireless sensor networks which typically rely on portable sources like batteries for power. Recent advances in ambient energy harvesting technology have made it a potential alternative source of energy for powering wireless sensor networks. In this paper, we study the performance of four different medium access control (MAC) protocols based on CSMA and polling techniques for wireless sensor networks which are powered by ambient energy harvesting. First, we define our model for describing the ambient energy harvesting process. Next, we derive the main performance metrics which are the per-node throughput of each sensor node (R) and the network throughput (S) which is the rate of sensor data received by the sink. We validate the analytical models using simulations, and the results show that neither CSMA-based nor polling protocols always gives the best performance results. These results aim to provide insights to the design of alg...