Persistent insomnia is among the most frequent complaints in general practice. To identify genetic factors for insomnia complaints, we performed a genome-wide association study (GWAS) and a genome-wide gene-based association study (GWGAS) in 113,006 individuals. We identify three loci and seven genes associated with insomnia complaints, with the associations for one locus and five genes supported by joint analysis with an independent sample (n = 7,565). Our top association (MEIS1, P < 5 × 10-8) has previously been implicated in restless legs syndrome (RLS). Additional analyses favor the hypothesis that MEIS1 exhibits pleiotropy for insomnia and RLS and show that the observed association with insomnia complaints cannot be explained only by the presence of an RLS subgroup within the cases. Sex-specific analyses suggest that there are different genetic architectures between the sexes in addition to shared genetic factors. We show substantial positive genetic correlation of insomnia complaints with internalizing personality traits and metabolic traits and negative correlation with subjective well-being and educational attainment. These findings provide new insight into the genetic architecture of insomnia.