All organisms live in temporally fluctuating environments. Theory predicts that the evolution of deterministic maternal effects (i.e., anticipatory maternal effects or transgenerational phenotypic plasticity) underlies adaptation to environments that fluctuate in a predictably alternating fashion over maternal-offspring generations. In contrast, randomizing maternal effects (i.e., diversifying and conservative bet-hedging), are expected to evolve in response to unpredictably fluctuating environments. Although maternal effects are common, evidence for their adaptive significance is equivocal since they can easily evolve as a correlated response to maternal selection and may or may not increase the future fitness of offspring. Using the hermaphroditic nematode Caenorhabditis elegans, we here show that the experimental evolution of maternal glycogen provisioning underlies adaptation to a fluctuating normoxia-anoxia hatching environment by increasing embryo survival under anoxia. In strictly alternating environments, we found that hermaphrodites evolved the ability to increase embryo glycogen provisioning when they experienced normoxia and to decrease embryo glycogen provisioning when they experienced anoxia. At odds with existing theory, however, populations facing irregularly fluctuating normoxia-anoxia hatching environments failed to evolve randomizing maternal effects. Instead, adaptation in these populations may have occurred through the evolution of fitness effects that percolate over multiple generations, as they maintained considerably high expected growth rates during experimental evolution despite evolving reduced fecundity and reduced embryo survival under one or two generations of anoxia. We develop theoretical models that explain why adaptation to a wide range of patterns of environmental fluctuations hinges on the existence of deterministic maternal effects, and that such deterministic maternal effects are more likely to contribute to adaptation than randomizing maternal effects.