We consider a wireless ad hoc network composed of N transmitters and M receivers which are all selfish in the sense that they wish to optimize their individual utilities rather than a network wide utility. Each node can acquire energy from a supplier at a price to power the transmission or reception of data. For such a network, we consider a matching game played between the transmitters and the receivers. The transmitters compute the optimal rate for them and propose this to a receiver. The receivers determine the best proposal they have received to maximize their utilities. We identify the optimal decisions for all nodes and the resulting utilities. We next consider a Vickrey auction between transmitters which have proposed to the same receiver. We show that the transmitters can compete with each other by offering energy transfer to the receiver. The energy transfer reduces the processing costs of the receiver and influences its decision, thereby pointing to the merit of energy cooperation. We observe that populating the network with additional nodes generally results in more options for all nodes to choose from, and larger rates for the entire network, which are improved even further by energy cooperation.