The effect of dietary factors on OSA remains unclear. This study was to investigate the association of obstructive sleep apnea (OSA) with individual and overall effects of eating habits among adult Chinese. Methods: A total of 9733 participants were selected from the baseline survey of the Guangzhou Heart Study. OSA was ascertained by Berlin Questionnaire. Food consumption was collected using a food frequency questionnaire, and eating patterns were extracted by principal component analysis. Odds ratios (ORs) with 95% confidence intervals (95% CIs) were calculated by the logistic regression model. Results: After adjustment for confounders, fried food intake with ≥1/week was associated with an increased risk of OSA (OR: 1.77, 95% CI: 1.37-2.27), while fruit consumption of ≥1/day was associated with a 26% reduced risk of OSA (OR: 0.74, 95% CI: 0.62-0.88). Three eating patterns were defined and labeled as pattern I, II, and III. Eating pattern III which had higher factor loadings of animal innards, fried food, salted food, carbonate, and non-carbonated beverages was associated with an increased risk of OSA (OR: 1.30, 95% CI: 1.09-1.55) when comparing the highest with the lowest tertile of pattern score, after adjusting for confounders; every 1-unit increment of pattern III score was associated with an increased risk of OSA (OR: 1.09, 95% CI: 1.04-1.14). Neither pattern I nor pattern II was observed to be associated with OSA risk. Conclusion: A higher frequency intake of fruits was associated with a reduced OSA risk and a diet with higher levels of consumption of animal innards, fried food, salted food, carbonated beverages, and non-carbonated beverages may increase the risk of OSA.