Sleep

Sex Moderates the Mediating Effect of Physical Activity in the Relationship Between Dietary Habits and Sleep Quality in University Students.

TL;DR

Unfavourable dietary patterns and lower physical activity were statistically associated with poorer sleep quality among university students, with physical activity mediating the diet-sleep relationship and sex moderating this indirect association, with stronger effects observed among females.

Key Findings

Poor sleep quality was substantially more prevalent among female university students than male students.

  • Poor sleep was present in 45.2% of females versus 14.6% of males
  • The difference was statistically significant: χ²(1) = 65.4, p < 0.001
  • Sleep quality was assessed using the Pittsburgh Sleep Quality Index (PSQI)
  • Sample consisted of 199 males and 219 females from Wroclaw University of Health and Sport Sciences

Machine-learning feature selection identified nine dietary behaviours statistically associated with sleep quality.

  • Unfavourable dietary behaviours linked to poorer sleep included: fast food, fried meals, sweetened beverages, energy drinks, and alcohol consumption
  • Favourable dietary behaviours associated with better sleep included: vegetables, curd cheese, and wholegrain bread
  • These nine behaviours were combined into a Synthetic Dietary Behaviour Index (SDBI) for use in subsequent analyses
  • Data-driven feature-selection methods were applied to identify these associations, with PSQI dichotomised for this step

Physical activity formed part of a statistically significant indirect association between dietary behaviour and sleep quality.

  • The mediation model showed physical activity mediated the relationship between dietary habits (SDBI) and sleep quality (PSQI score)
  • The indirect association was described as 'statistically significant but modest'
  • The model was adjusted for body mass index (BMI)
  • Physical activity was assessed using the International Physical Activity Questionnaire (IPAQ)

Sex moderated the path from physical activity to sleep quality in the mediation model.

  • The moderation effect on the IPAQ → PSQI path was statistically significant: β = -0.45, p = 0.006
  • This indicates that the relationship between physical activity and sleep quality differed between males and females
  • A moderated mediation model framework was used to test this sex-moderating effect

The indirect association between dietary behaviour and sleep quality through physical activity was significant for both sexes but stronger among females.

  • Indirect association for males: β = 0.032, p = 0.021
  • Indirect association for females: β = 0.102, p = 0.004
  • The female indirect effect was approximately three times larger in magnitude than the male indirect effect
  • Both indirect associations remained statistically significant after accounting for BMI as a covariate

The study used a cross-sectional design among university students with anthropometric measurements and validated questionnaires.

  • Total sample: 418 students (199 males, 219 females) from Wroclaw University of Health and Sport Sciences
  • Body height and body mass were measured using standard anthropometric procedures to calculate BMI
  • Dietary habits assessed with the Questionnaire of Eating Behaviours (QEB); physical activity with IPAQ; sleep quality with PSQI
  • Sleep quality was modelled as a continuous PSQI score in mediation analyses, while the dichotomised PSQI category was used only for feature selection

What This Means

This research suggests that among university students, unhealthy eating habits — such as consuming fast food, fried meals, sweetened drinks, energy drinks, and alcohol — are associated with worse sleep quality, while eating vegetables, curd cheese, and wholegrain bread is linked to better sleep. The study also found that physical activity plays a connecting role between diet and sleep: students with better dietary habits tended to be more physically active, and more physical activity was in turn linked to better sleep. Notably, female students experienced poor sleep at a much higher rate (45%) compared to male students (15%). The study further found that the indirect connection from diet to sleep through physical activity was stronger in women than in men, even though it was statistically meaningful for both sexes. Sex appeared to specifically influence how strongly physical activity was related to sleep quality, with the relationship being more pronounced for female students. These findings highlight that diet and physical activity do not operate in isolation — their combined lifestyle patterns matter for sleep health, and these patterns may affect men and women differently. This research suggests that efforts to improve sleep among university students might benefit from addressing both eating habits and physical activity together, rather than focusing on either alone, and that approaches tailored to sex differences could be more effective. However, because this was a cross-sectional study — meaning it captured a single snapshot in time — it cannot confirm that dietary habits or physical activity directly cause changes in sleep quality. Longitudinal or experimental studies would be needed to establish causal relationships.

Have a question about this study?

Citation

Domaradzki J. (2026). Sex Moderates the Mediating Effect of Physical Activity in the Relationship Between Dietary Habits and Sleep Quality in University Students.. Nutrients. https://doi.org/10.3390/nu18010026