Cyclical parthenogenesis presents an interesting challenge for the study of sex allocation, as individuals’ allocation decisions involve both the choice between sexual and asexual reproduction, and the choice between sons and daughters. Male production is therefore expected to depend on ecological and evolutionary drivers of overall investment in sex, and those influencing male reproductive value during sexual periods. We manipulated experimental populations, and made repeated observations of natural populations over their growing season, to disentangle effects of population density and the timing of sex from effects of adult sex ratio on sex allocation in cyclically parthenogenetic Daphnia magna. Male production increased with population density, the major ecological driver of sexual reproduction; however, this response was dampened when the population sex ratio was more male‐biased. Thus, in line with sex ratio theory, we show that D. magna adjust offspring sex allocation in response to the current population sex ratio.