Current efforts for the prevention of malaria have resulted in notable reductions in the global malaria burden; however, they are not enough. Good hygiene is universally considered one of the most efficacious and straightforward measures to prevent disease transmission. This work analyzed whether improved drinking water and sanitation (WS) conditions were associated with a decreased risk of malaria infection. Data were acquired through surveys published between 2006 and 2018 from the Demographic and Health Program in sub-Saharan Africa (SSA). Multiple logistic regression was used for each national survey to identify the associations between WS conditions and malaria infection diagnosed by microscopy or a malaria rapid diagnostic test (RDT) among children (0–59 months), with adjustments for age, gender, indoor residual spraying (IRS), insecticide-treated net (ITN) use, house quality, and the mother’s highest educational level. Individual nationally representative survey odds ratios (ORs) were combined to obtain a summary OR using a random-effects meta-analysis. Among the 247,440 included children, 18.8% and 24.2% were positive for malaria infection based on microscopy and RDT results, respectively. Across all surveys, both unprotected water and no facility users were associated with increased malaria risks (unprotected water: aOR 1.17, 95% CI 1.07–1.27, P = 0.001; no facilities: aOR 1.35, 95% CI 1.24–1.47, P < 0.001; respectively), according to microscopy, whereas the odds of malaria infection were 48% and 49% less among piped water and flush-toilet users, respectively (piped water: aOR 0.52, 95% CI 0.45–0.59, P < 0.001; flush toilets: aOR 0.51, 95% CI 0.43–0.61, P < 0.001). The trends of individuals diagnosed by RDT were consistent with those of individuals diagnosed by microscopy. Risk associations were more pronounced among children with a “nonpoor” socioeconomic status who were unprotected water or no facility users. WS conditions are a vital risk factor for malarial infection among children (0–59 months) across SSA. Improved WS conditions should be considered a potential intervention for the prevention of malaria in the long term.