The current agricultural water panorama in many Mediterranean countries is composed by desalination facilities, wells (frequently overexploited), the water public utility network, and several consumer agents with different water needs. This distributed water network requires centralized management methods for its proper use, which are difficult to implement as the different agents are usually geographically separated. In this sense, the use of enabling technologies such as the Internet of Things can be essential to the proper operation of these agroindustrial systems. In this paper, an Internet of Things cloud architecture based on the FIWARE standard is proposed for interconnecting the several agents that make up the agroindustrial system. In addition, this architecture includes an efficient management method based on a model predictive control technique, which is aimed at minimizing operating costs. A case study inspired by three real facilities located in Almería (southeast of Spain) is used as the simulation test bed. The obtained results show how around 75% of the total operating costs can be saved with the application of the proposed approach, which could be very significant to decrease the costs of desalinated water and, therefore, to maintain the sustainability of the agricultural system.