The method and system are for sealing/unsealing (regulating) airway leaks occurring between the ventilator circuit and respiratory airways during lung ventilatory support in response to myoelectrical activity of diaphragm. Myolectrical activity of a patients respiratory-related muscle is sensed to detect respiratory effort, and to produce a myoelectrical signal representative of the sensed muscle myoelectrical activity. Respiratory flow and pressure can also be measured to produce respective respiratory pressure and respiratory flow signals. A logic trigger sealing/unsealing of airway leaks in relation to the myoelectrical signal, respiratory flow signal and/or respiratory pressure signal to assist respiration of the patient. The amplitude of the myoelectrical signal is compared to a given threshold, and airway leaks are sealed when the amplitude of the myoelectrical signal is higher than this threshold. Increment of myoelectrical signal amplitude can be also detected to trigger the airway leak regulating device to seal the airway leaks, while decrement of the myoelectrical signal amplitude can be detected to unseal the airway leaks and thus permit air evacuation from the patients lungs.