ImportanceEvidence is limited regarding the safety of prenatal benzodiazepine and z-hypnotic exposure and its association with long-term neurodevelopment in childhood.ObjectiveTo quantify the associations of the timing and number of intervals of prenatal exposure to benzodiazepines and/or z-hypnotics with the risk of attention-deficit/hyperactivity disorder (ADHD) in childhood.Design, Setting, and ParticipantsThis cohort study used data from the 1999 to 2008 population-based Norwegian Mother, Father and Child Cohort Study, which are linked to the Medical Birth Registry of Norway, Norwegian Patient Registry, and Norwegian Prescription Database. Two populations of participants were created: a full sample and a mental health sample. The full sample included mothers and their live-born singletons, whereas the mental health sample was restricted to offspring of mothers who reported anxiety, depression, or sleeping problems during pregnancy or 6 months before pregnancy. Data were analyzed from September 2021 to February 2022.ExposuresMaternal self-report of benzodiazepine and/or z-hypnotic use during pregnancy was grouped into early pregnancy exposure and middle and/or late pregnancy exposure for analysis of the association with timing of exposure, and number of 4-week intervals of exposure was classified (single [1] vs multiple [≥2]) for analysis of the association with number of exposed intervals.Main Outcome and MeasuresThe outcome was ADHD, defined as time to ADHD diagnosis or filled prescription for ADHD medication. To control for confounding, inverse probability of treatment–weighted Cox proportional hazards regression models were used. Hazard ratios and 95% CIs were estimated. The weights were derived from propensity score modeling of the probability of benzodiazepine and/or z-hypnotic exposure as a function of potential confounders between the exposure and the outcome, including maternal symptoms of depression and anxiety.ResultsThe full sample comprised 82 201 pregnancies, and the mental health sample included 19 585 pregnancies. In total, 681 offspring (0.8%) in the full sample and 468 offspring (2.4%) in the mental health sample were prenatally exposed to benzodiazepines and/or z-hypnotics. After weighting, exposure in early (hazard ratio, 0.74; 95% CI, 0.39-1.94) and middle and/or late (hazard ratio, 0.76; 95% CI, 0.35-1.61) pregnancy was not associated with increased risk of childhood ADHD. There was no evidence of substantial association between the number of exposed intervals during pregnancy and childhood ADHD.Conclusions and RelevanceResults of this study suggest that there may be no increased risk of childhood ADHD associated with prenatal exposure to benzodiazepines and/or z-hypnotics, regardless of timing of exposure and number of exposed intervals. However, these findings should be interpreted with caution due to low study power.