A few studies have linked dietary patterns and sleep to cognitive decline. To examine the independent and joint associations of dietary patterns and sleep with cognitive decline. Our analysis included 2,307 participants aged 55- 89 years at baseline from the China Health and Nutrition Survey. Dietary intake was assessed using weighing methods in combination with 24 h dietary recalls for three consecutive days. Exploratory factor analysis was applied to identify major dietary factors. Cognition was assessed in 1997, 2000, 2004, 2006, and 2015. Five dietary patterns were identified: dairy-fruits-fast foods, grains-vegetables-pork, plant-based food, beans-mushroom, and beverages-nuts patterns. Beans-mushroom pattern and sleep duration of 8 h/day were defined as healthy habits. There was a positive association between the beans-mushroom pattern and change in the global cognitive Z-score over seven years (β (95% CI) for quintile 5 versus quintile 1:0.17 (0.05, 0.30)). Compared to individuals with sleep duration of 8 h/day, those with sleep duration of≤5 h/day (β (95% CI): - 0.23 (- 0.45, - 0.00)) or > 10 h/day (- 0.52 (- 0.73, - 0.32)) had a greater decrease in global cognitive Z-score. Compared to individuals with no healthy patterns, those with a healthy dietary pattern only (β (95% CI): 0.18 (0.08, 0.28)), healthy sleep pattern only (0.13 (0.04, 0.23), and both healthy dietary and sleep patterns (0.19 (0.08, 0.31)) had a relative increase in global cognitive Z-score. Our findings highlight the importance of involving both diet and sleep as intervention priorities for the potential prevention of cognitive decline.