In this paper we consider the application of the Ising model from statistical mechanics to model interactions among interfering stations in a wireless network with a line topology. Each station employs a medium access control (MAC) protocol such that it decides to transmit or not depending on the states of its nearest neighbors and itself in the previous time slot.We use the Ising model to demonstrate how the interactions between neighboring stations affect the one-hop throughput of the network and to optimize the underlying MAC protocol. Both the cases of single-packet and multipacket reception are considered. For single-packet reception, the throughput achieved by an optimized protocol is shown to be 15.8% better than that achieved by slotted ALOHA. In the multipacket reception case, the MAC protocol achieves the same throughput as TDMA, which doubles the throughput of slotted ALOHA.