Purpose: Psychological resilience is defined as the ability of an individual to adapt to adverse situations and in a certain way regulate mental health. Currently, the COVID-19 pandemic and lockdown measures implemented to avoid infection are considered risk agents for the development of mental disorders. The objective of this study is to explore the relationship between resilience capacity and the presence of depressive symptoms and poor sleep quality in the context of lockdown due to the pandemic. Methods: The sample consisted of n = 8,426 young adults who were recruited via convenience sampling. Sociodemographic and mental health data was collected through online surveys. Previously validated test were used to collect information on depression and sleep quality. Restriction of mobility was evaluated using information from Google Mobility Reports. Results: Most of participants were highly educated women. Independently from sex, age and other confounders, individuals with psychological resilience were less likely to develop depressive symptoms or sleep disorders during confinement due to the COVID-19 pandemic. Moreover, higher mobility restriction was associated with depression but not with bad sleep quality. In this way, a longest stay at home and a higher restriction of mobility to groceries and pharmacies were related to depression. Conclusions: These results show evidence of the importance of psychological resilience on mental health, and can contribute to the development of preventive public health interventions to face the negative effects of confinement on mental health.