Background: Promoting healthy lifestyles in children, has become a priority for public health institutions. However, electronic devices with screens encourage sedentary behaviors. The aim of this study was to analyze the evolution of the habits of physical activity practice and television watching in a cohort of 20 years of research in Spanish children. Methods: A cross-sectional, observational study was based on data from the Spain National Health Surveys between 1997 and 2017 (N = 11,444). The dependent variables considered were the frequency with which the minor practiced physical activity (PA) in his/her spare time, the daily TV viewing habit, and the daily hours of TV viewing. Results: The children who practiced physical activity daily has decreased 7.3% throughout the study period. The proportion of children who watched the television daily for more hours increased significantly (6.3%). Such increase was constant throughout the years, and the analysis by sex showed that the proportion of boys who watched television for more than three hours per day increased three percent, and that of girls increased fourfold. Conclusions: The habits of physical activity practice and television viewing have changed towards sedentary lifestyle. Particularly, the girls and the children between 12 and 14 years showed the most sedentary behavior. Public health policies must consider the differences between sexes in order for such interventions to be effective in the population of pre-adolescents, in general, and girls, in particular.