If you are sick, its not exactly the same as being healthy. Your body is fighting, and using energy, so to conserve it, you sleep. It also keeps your body colder too.
It depends on how sick you are, if you are really sick then gettin rest is really good for you, but if you can getting up and moving about is even better.