Abstract Background Insomnia, commonly treated with hypnotic agents, is an independent risk factor of cardiovascular diseases. Previous research demonstrated the detrimental effect of hypnotics on the prognosis of cardiovascular patients. Purpose We aimed to examine the association between hypnotic agents and cardiovascular outcomes in general individuals with insomnia. Methods In a propensity score matched cohort of UK Biobank (UKB) participants with insomnia, Cox proportional hazard model was used to estimate the association between regular use of hypnotic agents and predetermined cardiovascular outcomes including incident coronary heart diseases (CHD), heart failure (HF), stroke, and cardiovascular death. Inverse probability of treatment weighting and competing risk models were further performed during sensitivity analysis. Drug-target Mendelian randomization (MR) analyses were employed for further evaluation of hypnotics-related genes and cardiovascular disease association. The genome-wide association data of CHD, HF, and stroke were there large-scale genome-wide association analyses. Tissue-specified expression quantitative trait loci (eQTL) data was derived from BrainSeq phase II. Results During a median follow-up of 14.3 years, the matched cohort documented a total of 1,019 CHD cases, 406 HF cases, 285 stroke cases, and 197 cardiovascular deaths. No significant association was detected between Z-meds and CHD, stroke, and cardiovascular mortality. Benzodiazepine use was significantly associated with the increased risk of CHD, HF, and cardiovascular mortality (Figure 1). The inverse probability of treatment weighting and competing risk models didn’t alter the above associations. Moreover, drug-target MR analyses corroborated the safety of Z-meds in the general population regarding cardiovascular health. However, GABRG1—a drug target for benzodiazepines—was associated with heightened risks for heart failure, and ischemic stroke (Figure 2). Conclusions Our findings suggested the heterogeneous associations between different categories of hypnotics and incident cardiovascular events in individuals with insomnia. Z-meds are safe regarding the risk of cardiovascular outcomes in the UKB population with insomnia.Figure 1Figure 2