People's research on postpartum depression often uses some machine learning models for correlation analysis, which often rely on simple parameterized assumptions and are limited to covariance analysis, with poor interpretability. In order to further explain the mechanism of postpartum depression, this paper investigated the association between postpartum depressive symptoms using a Bayesian network model. Postpartum depression was discovered to be correlated with sleep by analysing data from 1503 maternal questionnaires gathered at a hospital in June 2022. DoWhy was used to perform causal inference analysis on a Bayesian network model. By calculating the causal effect, this paper found that good or bad sleep quality had a causal effect of approximately 17.4%. It indicates that poor sleep is 17.4% more likely to suffer from depression than good sleep and feelings of guilt and overeating or loss of appetite may respond to changes in other symptoms, while suicide attempt may worsen other symptoms.