The Present study was conducted to systematically review the effect of the melatonin on sleep quality. We summarized evidence from randomized clinical trials (RCTs) that investigated the effects of melatonin on sleep quality as assessed by the Pittsburgh Sleep Quality Index (PSQI) in adults with various diseases.The literature searches of English publications in MEDLINE and EMBASE databases were performed up June 2020. Results were summarized as mean differences (MD) with 95% confidence intervals (CI) using random effects model (DerSimonian-Laird method). Heterogeneity among studies was evaluated by the Cochrane Q test and I-squared (I2). To determine the predefined sources of heterogeneity, subgroup analysis was performed.Of 2642 papers, 23 RCTs met inclusion criteria. Our results indicated that melatonin had significant effect on sleep quality as assessed by the Pittsburgh Sleep Quality Index (PSQI) (WMD: - 1.24; 95% CI - 1.77, - 0.71, p = 0.000). There was significant heterogeneity between studies (I2 = 80.7%, p = 0.000). Subgroup analysis based on health status and kind of intervention were potential between-study heterogeneity. Subgroup analysis based on health status revealed melatonin intervention in subjects with Respiratory diseases (WMD: - 2.20; 95% CI - 2.97, - 1.44, p = 0.000), Metabolic disorders (WMD: - 2.74; 95% CI - 3.48, - 2.00, p = 0.000) and sleep disorders (WMD: - 0.67; 95% CI - 0.98, - 0.37, p = 0.000) has significant effect on sleep quality.We found that the treatment with exogenous melatonin has positive effects on sleep quality as assessed by the Pittsburgh Sleep Quality Index (PSQI) in adult. In adults with respiratory diseases, metabolic disorders, primary sleep disorders, not with mental disorders, neurodegenerative diseases and other diseases.