A modular system for the monitoring of the homeostasis in cavities for endoscopic procedures, comprising: - at least one intracavity device (2, 2'), having an insertable portion to be arranged in the interior of a cavity and a channel (2a, 2a') for the passage of fluid towards the cavity; - at least one sensor module attached to the insertable portion of the intracavity device (2, 2'), on the outside of the channel (2a, 2a') for the passage of fluid towards the cavity, to sense the conditions inside the cavity, the sensor module comprising at least one temperature or humidity sensor, or both, configured to measure the temperature and/or humidity inside the cavity; - a variable output humidifier and heating module (12, 13); - a fluid insufflation module configured to infuse a fluid into the interior of the cavity; - a second group of sensors, comprising at least a volume sensor, such as a tachometer, and at least a pressure sensor, the second group of sensors being arranged so that the fluid being insufflated flows through the volume sensor and pressure sensor; - a monitoring and control of the homeostasis module connected to the sensor module to the second group of sensors (16,17) and to the fluid insufflation module, and which comprises a processing unit; and - at least a first conduit which has a first end, connected to the monitoring and control of homeostasis module, and a second end connected to the intracavity device (2, 2'); the processing unit being configured to control the modular system to implement the following steps: - operate the humidifier and heating module (12,13) to modify the temperature and/or the humidity of the fluid being insufflated based on the data obtained by the sensor module; - record in the processing unit a working volume to be maintained in the cavity; - operate the fluid insufflation module to insufflate fluid into the cavity; - obtain a measure of the volume of the cavity based on the data obtained by the second group of sensors (16,17); - compare the measured volume of the cavity with the recorded working volume; - in case that the difference, in absolute value, between the measured volume and the recorded working volume is above a predetermined threshold, insufflate fluid to the cavity or extract fluid from the cavity to reestablish the recorded working volume in the cavity. - at least one intracavity device (2, 2'), having an insertable portion to be arranged in the interior of a cavity and a channel (2a, 2a') for the passage of fluid towards the cavity; - at least one sensor module attached to the insertable portion of the intracavity device (2, 2'), on the outside of the channel (2a, 2a') for the passage of fluid towards the cavity, to sense the conditions inside the cavity, the sensor module comprising at least one temperature or humidity sensor, or both, configured to measure the temperature and/or humidity inside the cavity; - a variable output humidifier and heating module (12, 13); - a fluid insufflation module configured to infuse a fluid into the interior of the cavity; - a second group of sensors, comprising at least a volume sensor, such as a tachometer, and at least a pressure sensor, the second group of sensors being arranged so that the fluid being insufflated flows through the volume sensor and pressure sensor; - a monitoring and control of the homeostasis module connected to the sensor module to the second group of sensors (16,17) and to the fluid insufflation module, and which comprises a processing unit; and - at least a first conduit which has a first end, connected to the monitoring and control of homeostasis module, and a second end connected to the intracavity device (2, 2'); - operate the humidifier and heating module (12,13) to modify the temperature and/or the humidity of the fluid being insufflated based on the data obtained by the sensor module; - record in the processing unit a working volume to be maintained in the cavity; - operate the fluid insufflation module to insufflate fluid into the cavity; - obtain a measure of the volume of the cavity based on the data obtained by the second group of sensors (16,17); - compare the measured volume of the cavity with the recorded working volume; - in case that the difference, in absolute value, between the measured volume and the recorded working volume is above a predetermined threshold, insufflate fluid to the cavity or extract fluid from the cavity to reestablish the recorded working volume in the cavity.