There are several theories why exercise may improve immune function, Kohut says, such as muscle-secreted proteins that influence the immune response and exercise-induced changes in the production of metabolites - chemical compounds that the body generates during metabolism.