Introduction: So far, the association between a longer sleep duration, state of health, and the risk of obesity and the influence of gender on the association between sleep duration and the risk of obesity has not been fully explained. Aim of the research: To examine the relationships between self-reported sleep duration, body mass index (BMI), and body fat percentage (%BF), and also to determine whether such associations are the same in men and in women. Material and methods: This study included 10,367 participants aged 37 to 66 years. Logistic regression was applied for risk assessment of the prevalence of abnormal BMI values and %BF in groups of sleep duration. Sleep of 7-8 h per night was adopted as a reference level. Results: In men, the risk of obesity was significantly greater only in the group sleeping ≤ 6 h (OR = 1.18, 95% CI: 1.08-1.28; p < 0.05); however, in women, only among those sleeping ≥ 9 h (OR = 1.14, 95% CI: 1.02-1.26; p < 0.05). The risk of obesity, determined on the basis of %BF, was higher only in individuals sleeping ≥ 9 h. In the adjusted model, it turned out to be significant in the general study population (OR = 1.28, 95% CI: 1.07-1.53; p < 0.05) and in women (OR = 1.14, 95% CI: 1.03-1.27; p < 0.05). Conclusions: In women, a greater risk of obesity was related to a longer sleep duration (≥ 9 h), whereas in men, the tendency of obesity occurrence along with shorter sleep (≤ 6 h). Thus, the physiological consequences of sleep duration may be different in women than in men.