The ability to adapt to changing environmental conditions is essential to the fitness of organisms. In some cases, adaptation of the parent alters the offspring's phenotype [1-10]. Such parental effects are adaptive for the offspring if the future environment is similar to the current one but can be maladaptive otherwise . One mechanism by which adaptation occurs is altered provisioning of embryos by the parent [12-16]. Here we show that exposing adult Caenorhabditis elegans to hyperosmotic conditions protects their offspring from these conditions but causes sensitivity to anoxia exposure. We show that this alteration of survival is correlated with changes in the sugar content of adults and embryos. In addition, mutations in gene products that alter sugar homeostasis also alter the ability of embryos to survive in hyperosmotic and anoxic conditions and engage in the adaptive parental effect. Our results indicate that there is a physiological trade-off between the presence of glycerol, which protects animals from hyperosmotic conditions, and glycogen, which is consumed during anoxia. These two metabolites play an essential role in the survival of worms in these adverse environments, and the adaptive parental effect we describe is mediated by the provisioning of these metabolites to the embryo.