Young adult cannabis use is common; while cannabis is often marketed as a product that can improve sleep, evidence supporting these claims is limited, and effects may differ for individuals with underlying mental health issues. This study measured the association between cannabis use and sleep problems among young adults and determined whether associations differ by mental health status. Using two waves of a young adult cohort study (baseline: March-September 2020; follow-up: January-June 2021), we measured the association of cannabis use frequency with subsequent sleep problems overall and stratified by baseline sleep quality and mental health status in separate moderation analyses. This study was conducted in Southern California, USA, and included 1926 participants aged 20-23 years (mean age = 21; 61% female, 46% Hispanic). Exposure was baseline cannabis use frequency (never use, prior use, 1-5 days/month, 6-19 days/month, ≥ 20 days/month). The outcome was sleep problems at follow-up (range = 4-24, higher score indicating worse sleep). Models were adjusted for socio-demographic factors, baseline sleep problems, mental health symptoms (depression and/or anxiety versus neither) and past 30-day nicotine or alcohol use. In moderation analyses, models were additionally stratified by mental health symptoms and baseline sleep quality (excellent versus imperfect sleep). Among the young adult sample, 11% used cannabis ≥ 20 days/month at baseline. For participants without baseline anxiety or depression symptoms, using cannabis ≥ 20 days/month (versus never use) was associated with greater sleep problems at follow-up [mean difference (MD) = 1.66, 95% confidence interval (CI) = 0.59-2.74]. Among participants with anxiety and/or depression and pre-existing sleep problems at baseline, using cannabis ≥ 20 days/month (versus never use) was associated with fewer sleep problems at follow-up (MD = -1.42, 95% CI = -2.81 to -0.02). The effects of cannabis use on sleep appear to differ by underlying mental health symptoms. Frequent cannabis use may improve sleep for young adults with depression and/or anxiety who have pre-existing sleep problems, but worsen sleep for young adults without depression and/or anxiety.