The COVID-19 pandemic resulted in multiple socially restrictive public health measures and reported negative mental health impacts in youths. Few studies have evaluated incidence rates by sex, region, and social determinants across an entire population. To estimate the incidence of hospitalizations for mental health conditions, stratified by sex, region, and social determinants, in children and adolescents (hereinafter referred to as youths) and young adults comparing the prepandemic and pandemic-prevalent periods. This Canadian population-based repeated ecological cross-sectional study used health administrative data, extending from April 1, 2016, to March 31, 2023. All youths and young adults from 6 to 20 years of age in each of the Canadian provinces and territories were included. Data were provided by the Canadian Institute for Health Information for all provinces except Quebec; the Institut National d'Excellence en Santé et en Services Sociaux provided aggregate data for Quebec. The COVID-19-prevalent period, defined as April 1, 2020, to March 31, 2023. The main outcome measures were the prepandemic and COVID-19-prevalent incidence rates of hospitalizations for anxiety, mood disorders, eating disorders, schizophrenia or psychosis, personality disorders, substance-related disorders, and self-harm. Secondary measures included hospitalization differences by sex, age group, and deprivation as well as emergency department visits for the same mental health conditions. Among Canadian youths and young adults during the study period, there were 218 101 hospitalizations for mental health conditions (ages 6 to 11 years: 5.8%, 12 to 17 years: 66.9%, and 18 to 20 years: 27.3%; 66.0% female). The rate of mental health hospitalizations decreased from 51.6 to 47.9 per 10 000 person-years between the prepandemic and COVID-19-prevalent years. However, the pandemic was associated with a rise in hospitalizations for anxiety (incidence rate ratio [IRR], 1.11; 95% CI, 1.08-1.14), personality disorders (IRR, 1.21; 95% CI, 1.16-1.25), suicide and self-harm (IRR, 1.10; 95% CI, 1.07-1.13), and eating disorders (IRR, 1.66; 95% CI, 1.60-1.73) in females and for eating disorders (IRR, 1.47; 95% CI, 1.31-1.67) in males. In both sexes, there was a decrease in hospitalizations for mood disorders (IRR, 0.84; 95% CI, 0.83-0.86), substance-related disorders (IRR, 0.83; 95% CI, 0.81-0.86), and other mental health disorders (IRR, 0.78; 95% CI, 0.76-0.79). This cross-sectional study of Canadian youths and young adults found a rise in anxiety, personality disorders, and suicidality in females and a rise in eating disorders in both sexes in the COVID-19-prevalent period. These results suggest that in future pandemics, policymakers should support youths and young adults who are particularly vulnerable to deterioration in mental health conditions during public health restrictions, including eating disorders, anxiety, and suicidality.