We conducted a theoretical study of the physiological significance of respiratory sinus arrhythmia (RSA), a phenomenon used as an index of cardiac vagal tone and wellbeing, whereby the heart rate (HR) increases during inspiration and decreases during expiration. We first tested the hypothesis that RSA improves gas exchange efficiency but found that although gas exchange efficiency improved with slow and deep breathing and with increased mean heart rate, this was unrelated to RSA. We then formulated and tested a new hypothesis: that RSA minimizes the work done by the heart while maintaining physiological levels of arterial carbon dioxide. We tested the new hypothesis using two methods. First, the HR for which the work is minimized was calculated using techniques from optimal control theory. This calculation was done on simplified models that we derived from a previously published model of gas exchange in mammals. We found that the calculated HR was remarkably similar to RSA and that this became more profound under slow and deep breathing. Second, the HR was prescribed and the work done by the heart was calculated by conducting a series of numerical experiments on the previously published gas exchange model. We found that cardiac work was minimized for RSA-like HR functions, most profoundly under slow and deep breathing. These findings provide novel insights into potential reasons for and benefits of RSA under physiological conditions.