Sleeping does not mean that human functions stop working. Some of them are slowed down, whereas some others are maintained or increased. Our brains and bodies are at work while we sleep.
First of all there is brain activity during sleep and at some stages it can be as active as if we were fully awake.
Moreover, certain physiological activities associated with digestion, cell repair, and growth are often greatest during sleep, as well as growth hormone is released at an increased rate during sleep.
What happens while we are watching TV? Nothing. While watching television, the brain appears to slow to a halt.