Purpose This study aimed to evaluate the relationship between sleep quality and sexual function among Iranian women. Methods This study was conducted on 277 married women of reproductive age. The inclusion criteria were as follows: married women aged 18–45 years, with at least basic literacy, and women married monogamously for at least one year. The following tools were used for gathering data: a demographic questionnaire; Pittsburgh Sleep Quality Index (PSQI); Insomnia Severity Index (ISI); Epworth Sleepiness Scale (ESS); and Female Sexual Function Index (FSFI). Pearson correlation coefficients, independent t-tests, chi-square tests, and linear regression analyses were used to analyze the data. Results There was a significant inverse relation between poor sleep quality (r = −0.13, P = 0.02), daytime sleepiness (r = −0.39, P < 0.001), insomnia (r = −0.35, P < 0.001), and sexual function. Sexual desire was significantly related to sleep quality and insomnia (P < 0.001). Sexual arousal (r = −0.18, r = −0.29, P < 0.001), lubrication (r = −0.21, r = −0.3, −0.12, P < 0.001), orgasms (r = 0.17, r = −0.15, P < 0.001), and sexual satisfaction (r = −0.02, −r = 0.3, r = −0.15, P < 0.001) were significantly related to all types of sleep disorders (poor sleep quality, insomnia, and sleepiness). Pain during intercourse was significantly associated with poor sleep quality and insomnia. With each unit decrease in sleep quality, sexual function decreased by 0.49 (P < 0.001), and with each unit increase in the delay of sleep onset, sexual function decreased by 1.58 (P = 0.04). Conclusion Results of this study showed that there was a significant relationship between sleep quality and sexual function in Iranian women of reproductive age. The quality of sleep among reproductive-aged women merits the attention of health care providers and policy makers.