Growing evidence supports an association between prenatal exposure to air pollution and adverse child health outcomes, including asthma and cardiovascular disease. Depending on the time and dose of exposure, epigenetic markers may be altered in ways that disrupt normal tissue development. Bayesian distributed lag models (BDLMs) have previously been used to characterize the time-varying association between methylation level at a given probe and air pollution exposure over time. However, by modeling probes independently, BDLMs fail to incorporate correlations between nearby probes. Instead, we use a function-on-function regression model to identify time periods during which there is an increased association between air pollution exposure and methylation level at birth. By accommodating both temporal correlations across pollution exposures and spatial correlations across the genome, this framework has greater power to detect critical windows of susceptibility to an exposure than do methods that model probes or exposure data independently. We compare the BDLM and function-on-function models via simulation, as well as with data from the Project Viva birth cohort.