Increased loop gain (a function of both controller gain and plant gain), which results in instability in feedback control, is of major importance in producing recurrent central apnoeas during sleep but its role in causing obstructive apnoeas is not clear. The purpose of this study was to investigate the role of loop gain in producing obstructive sleep apnoeas. Owing to the complexity of factors that may operate to produce obstruction during sleep, we used a mathematical model to sort them out. The model used was based on our previous model of neurochemical control of breathing, which included the effects of chemical stimuli and changes in alertness on respiratory pattern generator activity. To this we added a model of the upper airways that contained a narrowed section which behaved as a compressible elastic tube and was tethered during inspiration by the contraction of the upper airway dilator muscles. These muscles in the model, as in life, responded to changes in hypoxia, hypercapnia and alertness in a manner similar to the action of the chest wall muscles, opposing the compressive action caused by the negative intraluminal pressure generated during inspiration which was magnified by the Bernoulli Effect. As the velocity of inspiratory airflow increased, with sufficiently large increase in airflow velocity, obstruction occurred. Changes in breathing after sleep onset were simulated. The simulations showed that increases in controller gain caused the more rapid onset of obstructive apnoeas. Apnoea episodes were terminated by arousal. With a constant controller gain, as stiffness decreased, obstructed breaths appeared and periods of obstruction recurred longer after sleep onset before disappearing. Decreased controller gain produced, for example, by breathing oxygen eliminated the obstructive apnoeas resulting from moderate reductions in constricted segment stiffness. This became less effective as stiffness was reduced more. Contraction of the upper airway muscles with hypercapnia and hypoxia could prevent obstructed apnoeas with moderate but not with severe reductions in stiffness. Increases in controller gain, as might occur with hypoxia, converted obstructive to central apnoeas. Breathing CO2 eliminated apnoeas when the activity of the upper airway muscles was considered to change as a function of CO2 to some exponent. Low arousal thresholds and increased upper airway resistance are two factors that promoted the occurrence and persistence of obstructive sleep apnoeas.