Brainstem structures located in the medulla are in charge of the automatic mode, whereas cortico-subcortical brain networks - including various frontal lobe areas - subtend the voluntary mode.
Patients suffering from central congenital hypoventilation syndrome (CCHS), a very rare developmental condition secondary to brainstem dysfunction, make themselves breathe consciously while awake, but require mechanically-assisted ventilation (MV) during sleep to overcome the inability of brainstem structures to mediate automatic spontaneous breathing (SB), which is unreliable.
This study used EEG-fMRI to compare patterns of brain activity between voluntary and autonomic ventilation during wakefulness. It found that the CCHS patient was more efficient in cognitive tasks requiring executive control during MV than during SB. Mechanical ventilation freed up the brain to perform other cognitive functions.
https://journals.plos.org/plosone/article?id=10.1371/journal...