This paper presents a stochastic and cooperative approach for the operation of a cluster of interconnected multienergy systems. The proposed model investigates the interaction among energy systems with the upstream grid and neighbor energy systems. In this model, the hydrogen systems (consisting of fuel cell, electrolyzer, and hydrogen storage tank) and water system (water well, desalination unit, and water storage tank) are integrated into the electrical, heating, and cooling systems to provide an efficient and reliable structure for the energy systems. The proposed model studies the performance of energy system agents in both decentralized and cooperative scheduling. In the decentralized framework, each agent is responsible for locally supplying different energy demands with their resources and trading energy with the main grid. In the decentralized framework, peer-to-peer energy trading between neighbor energy systems is impossible. Also, each agent can trade energy with the upstream grid and other neighbor energy systems in the cooperative framework. The simulation result shows that the proposed cooperative model decreases the operation cost of the system by $ 56.9. Also, the water storage system reduces the operation cost by 5.78 % (86.23 $) and 3.28 % (49.61 $) in the cooperative and decentralized modes, respectively.