When you are ill your body is working harder to keep itself functioning normally, so yes, it probably would use more energy.
It depends how active you normally are when you're not ill of course. If you're a professional athlete as your normal day job then you are going to be using less than usual when you're ill in bed.
I wouldn't recommend it as a weight loss method, either way.