Little was known about the relationship between sleep disturbances and depressive and anxiety disorders, as well as the efficacy of treatment regimens. During 2021 to 2023, a total of 417 participants were screened by Hamilton Depression Rating Scale (HAMD-17) and Hamilton Anxiety Rating Scale (HAMA-14) for psychological status, and Pittsburgh sleep quality index (PSQI) assessment. 409 participants were finally enrolled, of which 188 (45.97%) were suffered from sleep disorders. All participants were received polysomnography (PSG) followed by six-week pharmacological treatment of escitalopram and zopiclone, and finally assessed by HAMD-17 and HAMA-14 for treatment efficacy. PSG monitoring indicated that participants with depression experienced prolonged rapid eye movement sleep latency (REMSL) and increased wakefulness after sleep onset (WASO) (P=0.030 and P=0.002, respectively). Those with anxiety disorders demonstrated a significantly higher percentage of non-rapid eye movement sleep (NREM%) and reduced WASO (P=0.013 and P=0.001, respectively). After six-weeks pharmacological treatment, participants with or without sleep disorders exhibited with similar efficacy outcomes of depression and anxiety disorders (P>0.05). However, every point of PSQI increment at baseline would decrease 0.78 and 0.85 times of probability of effective pharmacological treatment of depression and anxiety disorders. Moreover, participants with both effective outcomes of depression and anxiety disorders were found significant shorter sleep onset latency (SOL) (P<0.001). The insights gained underscore the necessity of considering sleep disturbances in enhancing the overall effectiveness of pharmacological treatments for depression and anxiety disorders.