['Recently, a considerable amount of evidence suggested that anxiety, depression and other psychosocial variables might influence the outcomes of cardiac surgery. This study investigated the relationship between length of stay at the intensive care unit (ICU) and hospital after surgery and different psychosocial variables (e.g. depression, anxiety, self rated health, happiness, satisfaction).', 'We enrolled prospective patients who were waiting for elective cardiac surgery (N\u2009=\u2009267) and consented to take part in the study. We collected data of sociodemographic, medical and perioperative factors as well as psychosocial questionnaires completed 1.56\xa0days (standard deviation [SD]\u2009=\u20090.7) before surgery. The primary clinical endpoint was an ICU stay of at least 3\xa0days and the secondary was hospital stay of at least 10\xa0days.', 'Two hundred sixty-seven patients participated in this study. Four patients (1.5%) died in the hospital and 38 patients (14.5%) spent more than 3\xa0days in the ICU and 62 patients (23.2%) spent more than 10\xa0days in the hospital. After controlling for medical and sociodemographic factors, lower self rated health (Adjusted Odds Ratio [AOR]: 0.51, 95% confidence interval [CI]: 0.28-0.95; p\u2009=\u20090.03), lower rate of happiness (AOR: 0.76, 95% CI: 0.59-0.97, p\u2009=\u20090.03), postoperative cardiac failure (AOR: 7.09, 95% CI:1.21-41.54; p\u2009=\u20090.03) and postoperative complications (AOR: 9.52, 95% CI: 3.76-24.11; p\u2009<\u20090.001) were associated with longer ICU stay. More than 10\xa0days of hospital stay was associated with higher occurrence of COPD (AOR 4.56, CI: 1.95-10.67, p\u2009<\u20090.001), NYHA stage (AOR 6.76, CI: 2.57-17.79, p\u2009<\u20090.001), operation time (AOR 1.45, CI: 1.19-1.76, p\u2009<\u20090.001), female gender (AOR 2.16, CI: 1.06-4.40, p\u2009=\u20090.034) and lower self-rated health (AOR 0.63, CI: 0.41-0.99, p\u2009=\u20090.044).'] Is self-rated health associated with the length of stay at the intensive care unit and hospital following cardiac surgery?