Shifts in Brazil's demographic structure have expanded the country's elderly population and consequently increased the rates of chronic diseases. This paper describes the prevalence of sedentary lifestyle and associated factors in a cross-sectional study, including 4,060 non-elderly and 4,003 elderly adults in 41 cities in seven States of the country. Prevalence of sedentary lifestyle was 31.8% (95%CI: 30.4-33.2) in non-elderly adults and 58.0% (95%CI: 56.4-59.5) in the elderly; sedentary lifestyle was more frequent in the Northeast and among males. Low family income was associated with higher prevalence of sedentary lifestyle in both non-elderly and elderly adults, while low schooling was only observed among the elderly. There was an inverse association between self-reported health status and sedentary lifestyle. Mean prevalence of sedentary lifestyle was higher in areas covered by pre-PROESF units in comparison to other health system models. We conclude that sedentary lifestyle is highly prevalent and that disadvantaged socioeconomic groups are more likely to be sedentary.