The present disclosure relates to a system (1; 1A) for use in connection with mechanical ventilation of a patient (3), provided by a ventilator (5). The system comprises a bioelectric sensor arrangement (7; 7A; 7B) configured to register at least one bioelectric signal (SLP; SLP(TA), SLP(CT); Se1-5; Se11-12), herein referred to as LP signal, originating from and relating to muscular activity of at least one muscle (17, 19) in the laryngopharyngeal region (9) of said patient (3). The system further comprises at least one control unit (11; 11A, 11B) configured to control the operation of said ventilator (5) based on said at least one LP signal. The control unit is configured to determine if a level of ventilatory assist currently provided to the patient and/or a level of positive end-expiratory pressure [PEEP] currently applied to the patient should be adjusted, based on said at least one LP signal.