Sometimes it does. Especially when the specific type of fulfillment they have the freedom to boast about is something that feels unreachable to you at the moment.
It's hard not to have negative feelings when you're in a situation like that, and it's easy for that negativity to become targeted towards people who don't have to go through what you're going through...this is one strategy to prevent that from happening.
I think it's more toxic to let feelings of envy and bitterness fester under the surface and start to color how you treat people than to just admit to yourself that you need a break from them.
Like, if your friends are getting married and the fact that you can't do the same is so painful that you feel the need to get away from them, that's not just pettiness. That's your brain trying to tell you that you're hurting, and you need time to heal.
This might be an unpopular opinion, but envy is an emotion like any other, and it needs to be managed and prevented from causing collateral damage, just like any other.
For anger, we have anger management. For sadness and loneliness, we have emotional support. But for jealousy and envy, the general consensus seems to be 'just don't be' and I don't think that's fair.
I guess it's hard for other people to swallow that not everyone around them will always be 100% happy for their successes and joys, and fully expect them to do the 'polite' thing and just pretend anyway...? Which is fine, for those who can handle it...but for those who can't, I think stepping away is the next best thing.
And this thread is specifically about social media, which isn't real life (and often concerns people you don't actually know and don't owe any of your time and energy), so...I don't see any problem with just muting and going on with your day.