There is a growing interest whether prehabilitation interventions can reduce length of hospital stay and perioperative morbidity after major surgery. The aim of prehabilitation is to improve patients' functional capacity to withstand the upcoming stress of surgery. Prehabilitation is defined as an active program of structured exercise over a period of weeks to improve preoperative cardiovascular, respiratory, and muscular conditioning. Exercise in preparation for surgery is known to be associated with reduced postoperative complications and rapid restoration of functional status. However, prehabilitation programs are not yet standardized and there is no consensus on which parameters can accurately evaluate their effectiveness.

Many elements of prehabilitation are analogous to athletes' training, and it seems straightforward to compare prehabilitation before surgery to athletic preparation before competitions. Traditionally, post training recovery and physiological reserve are assessed by tools considered expensive and challenging in everyday use. For this reason, the use of heart rate variability (HRV), the variability in the distance between the R-R waves of the electrocardiogram, has become a logical solution as it identifies major regulatory processes after exercise. HRV parameters are commonly used to analyze stress experienced by the body during training and they can predict physiological recovery after training. HRV is the most validated method to measure the activity of the sympathetic and parasympathetic nervous systems. Surgery is considered as a physical stress which the body responds to by means of sympathetic and parasympathetic nervous system activities. While on one hand the sympathetic nervous system upregulates mechanisms of body response in stress situations, parasympathetic system is activated during relaxation through the vagus nerve. Among the effects of the sympathetic nervous system there are hyperglycemia, increased blood pressure and heart rate, activation of the inflammatory response, and increased myocardial oxygen consumption. Sympathetic nervous system activity tends to synchronize with the R-R intervals, reducing their variability. HRV measures the balance between parasympathetic and sympathetic nervous systems, and it seems to be associated to perioperative hypotension, nociception/anesthesia balance, and perioperative risk assessment. The reduction in the risk of coronary artery disease following physical activity may be due to increased HRV. Similarly, surgical prehabilitation could have beneficial effects on perioperative outcome through a possible increase in HRV.

Therefore, the aim of this study is to evaluate the impact of a multimodal program of prehabilitation on heart rate variability in patients undergoing thoracic surgery. Patients enrolled in this study will be randomized (ratio 1:1) and allocated either to the intervention group (Prehabilitation), or to the control group, which will be treated according to usual standard of care within Enhanced Recovery After Surgery (ERAS) pathways. The hypothesis is that standard deviation of normal to normal index of heart rate variability from baseline to the days before surgery will increase in patients undergoing prehabilitation. The hypothesis is also to observe a reduction of length of hospital stays in patient with an elevated standard deviation of normal to normal index of heart rate variability.