The study in beetles is the first to link an animal's nutritional intake during sexual development with its adult breeding habits.
It could aid understanding of the likely impact on animals' behaviour as food availability varies with changing climates in the future.
Researchers from the University of Edinburgh carried out tests using burying beetles, which become sexually mature a few days after reaching adulthood.
Scientists raised groups of males and female beetles from birth before placing them with potential mating partners.
Some of the beetles were given less food than others, either at the time of their sexual development, or when placed alongside the opposite sex.
Females that had been underfed at any point in their lives preferred to mate with well-fed males, the study showed.
This may be because they seek to optimise the health of their offspring by choosing a partner in relatively good condition.
Males that had been denied food during sexual development also behaved differently from those who had not.
Underfed males spent more time making courtship signals, possibly to avoid physically competing with other males for mates, researchers suggest.
Scientists say their findings – that diet during development influences sexual behaviour – may be common in other species.
Future studies could examine this, and what impact this may have on the offspring of affected animals.
The research, published in Animal Behaviour, was funded by the Natural Environment Research Council.
Poor nutrition during sexual development may cause damage that can't be undone in terms of an individual's lifelong health and wellbeing, says Jon Richardson, School of Biological Sciences.
More information: Jon Richardson et al, Nutrition during sexual maturation and at the time of mating affects mating behaviour in both sexes of a burying beetle, Animal Behaviour (2019). dx.doi.org/10.1016/j.anbehav.2019.03.013
Journal information: Animal Behaviour
Provided by University of Edinburgh