The concept of a healthy lifestyle is receiving increasing attention. This study sought to identify an optimal healthy lifestyle profile associated with sleep health in general population of China. An online cross-sectional survey was conducted from June to July 2022. Six healthy lifestyle factors were assessed: healthy diet, regular physical exercise, never smoking, never drinking alcohol, low sedentary behavior, and normal weight. Participants were categorized into the healthy lifestyle (5-6 factors), average (3-4 factors), and unhealthy lifestyle groups (0-2 factors). The study’s primary outcome was sleep health, which included sleep quality, duration, pattern, and the presence of any sleep disorder or disturbance, including insomnia, excessive daytime sleepiness, obstructive apnea syndrome, and narcolepsy. Multivariable logistic regression analysis was applied to explore lifestyles associated with the selected sleep health outcomes. 41,061 individuals were included, forming 18.8% healthy, 63.8% average, and 17.4% unhealthy lifestyle groups. After adjusting for covariates, participants with healthy lifestyle were associated with a higher likelihood of good sleep quality (OR = 1.56, 95% CI = 1.46–1.68), normal sleep duration (OR = 1.60, 95% CI = 1.49–1.72), healthy sleep pattern (OR = 2.15, 95% CI = 2.00–2.31), and lower risks of insomnia (OR = 0.66, 95% CI = 0.61–0.71), excessive daytime sleepiness (OR = 0.66, 95% CI = 0.60–0.73), and obstructive apnea syndrome (OR = 0.40, 95% CI = 0.37–0.43), but not narcolepsy (OR = 0.92, 95% CI = 0.83–1.03), compared to those with unhealthy lifestyle. This large cross-sectional study is the first to our knowledge to quantify the associations of a healthy lifestyle with specific aspects of sleep health. The findings offer support for efforts to improve sleep health by modulating lifestyle.