Male reproductive glands like the mammalian prostate and the paired Drosophila melanogaster accessory glands secrete seminal fluid components that enhance fecundity. In humans, the prostate, stimulated by environmentally regulated endocrine and local androgens, grows throughout adult life. We previously showed that in fly accessory glands, secondary cells (SCs) and their nuclei also grow in adults, a process enhanced by mating and controlled by bone morphogenetic protein (BMP) signalling. Here, we demonstrate that BMP-mediated SC growth is dependent on the receptor for the developmental steroid ecdysone, whose concentration is reported to reflect sociosexual experience in adults. BMP signalling appears to regulate ecdysone receptor (EcR) levels via one or more mechanisms involving the EcR’s N terminus or the RNA sequence that encodes it. Nuclear growth in virgin males is dependent on ecdysone, some of which is synthesised in SCs. However, mating induces additional BMP-mediated nuclear growth via a cell type–specific form of hormone-independent EcR signalling, which drives genome endoreplication in a subset of adult SCs. Switching to hormone-independent endoreplication after mating allows growth and secretion to be hyperactivated independently of ecdysone levels in SCs, permitting more rapid replenishment of the accessory gland luminal contents. Our data suggest mechanistic parallels between this physiological, behaviour-induced signalling switch and altered pathological signalling associated with prostate cancer progression.