People who spend more than four hours a day watching TV are more likely to suffer from sleep problems.
New research has found that the most inactive people run the highest risk of getting obstructive sleep appnoea (OSA), which causes breathing to repeatedly stop and start during sleep.
The condition can cause high blood pressure, stroke, heart attack and diabetes.
The study followed 130,000 men and women in the United States over a period of 10-18 years and concluded that higher levels of physical activity is associated with a lower risk of OSA.
Professor Tianyi Huang, from Harvard Medical School, said: "We found that physical activity and sedentary behaviour are independently associated with OSA risk. That is, for people who spend long hours sitting every day, increasing physical activity in their leisure time can equally lower OSA risk.
"Similarly, for those who are not able to participate in a lot of physical activity due to physical restrictions, reducing sedentary hours by standing or doing some mild activities could also lower OSA risk. However, those who can lower sedentary time and increase physical activity would have the lowest risk."