Offspring sex ratios are predicted to vary with maternal condition where fitness returns are sex-specific, such as where one sex is differentially advantaged by extra investment. Studies in mammals tend to support the condition-dependent hypothesis, but results and effect sizes vary, suggesting constraints on maternal control. Maternal effects during gestation influence developing offspring and can cause lifelong physiological changes, which may be adaptive when anticipatory, with offspring ready to respond appropriately to certain environmental conditions, like predation risk. However, when a mismatch occurs between the pre- and post-natal environments, these effects may be detrimental if offspring are prepared for a different environment. Maternal effects do alter sex ratios in mice. Here we test whether this is due to an anticipatory maternal effect, by experimentally manipulating the gestational environment, and then breeding the female offspring in an environment that was either matched or mismatched to their environment during development. Females with matching environments displayed the predicted positive relationship between body condition and sex ratio, but females breeding in mismatched environments did not. Thus, the predicted condition-sex ratio relationship is obscured by anticipatory maternal effects when the environment changes, which may explain why some studies find unexpected sex ratio effects when developmental history is unknown. Furthermore, it may also contribute to unusual sex ratios seen in recently reintroduced or translocated populations which contribute to slow recovery rates, and effects may become more common with accelerating environmental change.