Objectives: Although workers with poor sleep quality are reported to have problems with work performance, few studies have assessed the association between dietary factors and sleep quality using validated indexes. Here, we examined this association using information acquired from validated questionnaires. Methods: A total of 3,129 female workers aged 34 to 65 years were analyzed. Dietary intake was assessed using a self-administered diet history questionnaire (DHQ), and subjective sleep quality was assessed using the Pittsburgh Sleep Quality Index (PSQI). The relationship between the intake of several food groups and nutrients and sleep quality was examined using multivariable logistic regression models. The effect of eating habits on sleep quality was also examined. Results: Poor sleep quality was associated with low intake of vegetables (p for trend 0.002) and fish (p for trend 0.04) and high intake of confectionary (p for trend 0.004) and noodles (p for trend 0.03) after adjustment for potential confounding factors (age, body mass index, physical activity, depression score, employment status, alcohol intake and smoking status). Poor sleep quality was also significantly and positively associated with consumption of energy drinks and sugar-sweetened beverages, skipping breakfast, and eating irregularly. In addition, poor sleep quality was significantly associated with high carbohydrate intake (p for trend 0.03). Conclusion: A low intake of vegetables and fish, high intake of confectionary and noodles and unhealthy eating habits were independently associated with poor sleep quality. Poor sleep quality was also associated with high carbohydrate intake in free-living Japanese middle-aged female workers.