The impact of psychosocial factors on health has received increased attention. This study employed a multi-stage hierarchical cluster sampling method and a cross-sectional survey was conducted from March to August 2017. By studying 2116 oilfield workers based in Karamay, Xinjiang, the relationship between occupational stress, blood hormone levels, and sleep was analyzed. Occupational stress was measured using the internationally accepted Occupational Stress Inventory Revised Edition (OSI-R) questionnaire and sleep disorders were measured using the Pittsburgh Sleep Quality Index (PSQI) questionnaire. The study found that the sleep quality of respondents was not high and the incidence of sleep disorders was 36.67%. The higher the level of occupational stress, the higher the incidence of sleep disorders. Irregular shifts can affect sleep quality and individuals with high-level professional titles experience a higher incidence of sleep disorders than those with low-level titles. The total score of the PSQI was different among the low, medium, and high stress groups. The higher the level of stress, the higher the scores of subjective sleep quality, sleep disorder, and daytime dysfunction. The scores of the PSQI, subjective sleep quality, sleep time, sleep disturbance, and daytime dysfunction in the high-stress group were higher than those in the low stress group. A case-control study found that the concentration of glucocorticoids in the sleep disorder positive group was lower than that in the sleep disorder negative group. The results of the regression analysis showed that glucocorticoid is a protective factor for sleep disorders (OR = 0.989, 95% CI: 0.983–0.995), suggesting that the higher the level of glycosaminoglycan, the less likely the subject is to have sleep disorders. For example, in the case of high occupational stress, the interaction between low and moderate occupational stress levels and glucocorticoids is a protective factor for sleep disorders.