The biomedical hypothesis proposed here is that the immediate trigger for a yawn is a restricted collapse of a few alveoli in the lungs. The extent of this alveolar collapse may be too small for it to be detected by current X-ray technology, but this technology is continually improving and may soon be good enough to test the hypothesis. In support of the hypothesis, it is shown that yawning can be inhibited by deep breaths of air, nitrogen or carbogen, thus showing that yawning is not triggered by lack of oxygen or by excess carbon dioxide, leaving alveolar collapse as the most likely possibility. A more extensive form of alveolar collapse is termed atelectasis and this involves a serious state of hypoxia which, if deepened or prolonged, can be fatal. Therefore, if the hypothesis is correct, yawning may prevent the development of atelectasis and save lives. This paper is not concerned with other indirect ways in which yawning may be induced, nor with the mechanism and neural circuitry of the yawn, nor with social aspects of yawning, only with the immediate trigger. My aim is to get better evidence for the hypothesis put forward here and also to study the behaviour of the pulmonary alveoli in normal respiration.