Considering the pharmacological treatment options for endometriosis-associated pain are confined to hormonal therapy and analgesics, we studied the analgesic effect of 20 mg melatonin as an adjuvant therapy in women with endometriosis-associated pain. This randomized double-blinded, placebo-controlled trial was conducted at the Research Center for Womens’ Health at Södersjukhuset, a university hospital in Stockholm, Sweden. Forty women from 18 to 50 years of age with endometriosis and severe dysmenorrhea with or without chronic pelvic pain were given 20 mg Melatonin or placebo orally daily for two consecutive menstrual cycles or months. The level of pain was recorded daily on the 11-point numeric rating scale, a difference of 1.3 units was considered clinically significant. Clincaltrials.gov nr NCT03782740. Sixteen participants completed the study in the placebo group and 18 in the melatonin group. The difference in endometriosis-associated pain between the groups showed to be non-significant statistically as well as clinically, 2.9 (SD 1.9) in the melatonin group and 3.3 (SD 2.0) in the placebo group, p = 0.45. This randomized, double-blinded, placebo-controlled trial could not show that 20 mg of melatonin given orally at bedtime had better analgesic effect on endometriosis-associated pain compared with placebo. No adverse effects were observed.