Parents now have science to back them up when they say, "Turn off the TV. It’s a school night."

Middle school students who watch TV or play video games during the week do worse in school, a new study finds, but weekend viewing and gaming doesn’t affect school performance much.

"On weekdays, the more they watched, the worse they did," said study co-author Dr. Iman Sharif of Children’s Hospital at Montefiore in the Bronx. "They could watch a lot on weekends and it didn’t seem to correlate with doing worse in school."

Children whose parents allowed them to watch R-rated movies also did worse in class, and for boys, that effect was especially strong. The findings are based on a survey of 4,500 students in 15 New Hampshire and Vermont middle schools. The study appears in the October issue of Pediatrics.

Weekend viewing and gaming slightly hurt school performance, but only when the students spent more than four hours each day at it over the weekend.

The study didn’t look at grades or test scores, relying instead on students’ own rating of their performance from "excellent" to "below average." Sharif said other studies have shown that students generally inflate their actual school performance when asked. But since both good and bad students overrate their performance, she said, self-reporting is reliable.

Researchers took into account the possible effect of different parenting styles as reported by the students, and they still found weekday TV viewing, video games and R-rated movie-watching harmful.

The researchers did not ask specific questions about homework rules at home, said Sharif, who has three children, ages 7, 11 and 15. Her children watch about an hour of TV after school and then "it goes off and they do homework," she said.

The researchers didn’t speculate on why boys might be more affected by R-rated movies than girls.

But Douglas Gentile, who does similar research at Iowa State University, said boys may be watching more violent R-rated movies that make them more aggressive. The aggression may lead to poor school performance, said Gentile, who was not involved in the new study.

"This study should hammer home to parents that this is really serious," Gentile said. "One question all parents are going to be faced with (from their children) is, ‘Can I have a TV in my bedroom?’ There’s a simple two-letter answer for that."

Previous studies have found links between the ability to learn and TV watching, including a study that found that children with TVs in their bedrooms scored about eight points lower on math and language arts tests than children without bedroom TVs.

The American Academy of Pediatrics recommends that older children watch no more than two hours daily of "quality" programming and that televisions be kept out of children’s rooms.