Wireless sensor networks consist of resource-constrained nodes; especially with respect to power resources. Often, the replacement of a dead node is difficult and costly; e.g., a node may be implanted in the human body. Therefore, it is important to reduce the total power consumption of WSNs. The major consumer of power is the data transmission process. This paper considers nodes which cooperate in data transmission in terms of a group. A mobile node may move to a new location, in which it is desirable for the node to join a group. We propose a protocol to allow nodes to choose the best group in their signal range, using coalitional game theory to determine what is beneficial in terms of power consumption. The protocol is formalized as an SOS-style transition system. This formalization forms the basis for an implementation in the rewriting logic tool Maude, so the protocol can be validated using Maude’s model exploration facilities. First, we prove the correctness of our proposed protocol, by searching for failures through all possible behaviors for given initial states. For these searches, the grouping is done correctly in all reachable final states of the model. Second, we simulate the model behavior to quantitatively analyze the efficiency of the proposed protocol. The results show significant improvements in power efficiency.