||Melatonin is a darkness hormone secreted by the pineal gland, which serves a role in idiopathic oligoasthenoteratozoospermia (iOAT). The present study aimed to evaluate the seminal plasma and serum melatonin levels of 50 patients with iOAT and 50 normal fertile controls and the effects of exposure to light at night on semen parameters. Semen analyses were performed according to the World Health Organization 2010 guidelines. Measurements of serum and seminal plasma melatonin, serum TSH, FT3, FT4, free testosterone, prolactin, FSH and LH were performed using ELISA. The overall results revealed that the serum and seminal plasma levels of melatonin were lower in patients with iOAT compared with the control subjects (P=0.0004 and 0.01, respectively). Patients with iOAT who were exposed to light at night exhibited lower serum and seminal plasma melatonin levels compared with those who were not exposed to light at night (P<0.0001 and 0.02, respectively). Additionally, similar significant differences were identified in control subjects exposed to light at night when compared to non‑exposed controls. There was a significantly positive correlation between serum melatonin levels and sperm motility in the entire iOAT patient cohort (r=0.614; P<0.0001) and a significantly positive correlation between the serum and seminal plasma melatonin levels in the non‑exposed iOAT patient subgroup (r=0.753; P<0.001). Thus, darkness and sleep at night may improve the semen parameters of patients with iOAT, as evidenced by the effects of light exposure at night on the serum and seminal plasma levels of melatonin and, consequently, on semen parameters.