If you're just laying in bed all day for one or two days or because you are sick and need to lay in bed all day during the illness then it's not bad to lay in bad all day for those things or that amount of time.
But if all you do is wake up and just lay in bed all day and only get up to shower and use the bathroom then that is bad because laying in bed all day can lead to weight gain, health issues, insomnia, depression etc.
Our bodies need exercise to stay healthy so you should get out of bed and walk around the house, use an exercise bike, treadmill etc.
Or go outside and take a walk around the block as it will benefit your health and you'll feel much better.
Laying in bed all the time could also lead to bed sores so make sure you get out of bed at least part of the day but for one or two days if you're feeling like just laying in bed or lounging around on the couch such as for the weekend then there's no harm in that.
Some cold winter days all I want to do is lay in bed but I force myself up to get moving around the house and then lounge around on my couch using my laptop or watching TV.
I do get up to use the restroom though and take a shower, make dinner, lunch, breakfast etc too.