Background: Epigenetic processes, including DNA methylation (DNAm), are among the mechanisms allowing integration of genetic and environmental factors to shape cellular function. While many studies have investigated either environmental or genetic contributions to DNAm, few have assessed their integrated effects. We examined the relative contributions of prenatal environmental factors and genotype on DNA methylation in neonatal blood at variably methylated regions (VMRs), defined as consecutive CpGs showing the highest variability of DNAm in 4 independent cohorts (PREDO, DCHS, UCI, MoBa, N=2,934). Results: We used Akaike's information criterion to test which factors best explained variability of methylation in the cohort-specific VMRs: several prenatal environmental factors (E) including maternal demographic, psychosocial and metabolism related phenotypes, genotypes in cis (G), or their additive (G+E) or interaction (GxE) effects. G+E and GxE models consistently best explained variability in DNAm of VMRs across the cohorts, with G explaining the remaining sites best. VMRs best explained by G, GxE or G+E, as well as their associated functional genetic variants (predicted using deep learning algorithms), were located in distinct genomic regions, with different enrichments for transcription and enhancer marks. Genetic variants of not only G and G+E models, but also of variants in GxE models were significantly enriched in genome wide association studies (GWAS) for complex disorders. Conclusion: Genetic and environmental factors in combination best explain DNAm at VMRs. The CpGs best explained by G, G+E or GxE are functionally distinct. The enrichment of GxE variants in GWAS for complex disorders supports their importance for disease risk.