A method includes controlling a cardiac pacing rate of an implantable medical device to control a heart rate of a patient and detecting inhalation and exhalation of the patient. The method further includes determining that the patient is in a resting state, and, in response to determining that the patient is in the resting state, incrementally increasing the pacing rate while exhalation of the patient is detected and incrementally decreasing the pacing rate while inhalation of the patient is detected.