The Internet of Things (IoT) paradigm envisions billions of interconnected things. This high density of things generates a huge amount of data, which results in communication delays and increases the amount of contention. Thus, it is necessary to have efficient Medium Access Control (MAC) protocols to coordinate channel access. In this paper, we consider a network throughput maximization problem in which a set of selfish nodes compete for transmission opportunities in the IoT scenario. To enhance cooperation among the nodes and to reduce the collision rate, we formulate a memory-one channel access game in which the nodes maximize their payoffs by optimizing their channel access probabilities, conditioned on their previous transmission state. A distributed learning algorithm is used by the nodes to solve the problem efficiently in order to overcome any coordination overhead. We investigate the impact of the network topology on the solution to the problem. Our simulation results show that the throughput achieved by the memory-one game outperforms the throughput achieved by other methods including IEEE 802.11 DCF protocol.