If you're worried that you haven't spent enough time on the question of how a sloth can hang upside-down all the time without its slow-digesting stomach rendering its lungs useless, worry no more: Others have put in the time, and now there is an answer. It turns out, as it usually does, that evolution has played its part.
Sloths might be the least in-a-hurry creatures out there. They move sloooowly and spend the vast majority of their lives just hanging out, upside-down. They can sleep for up to 20 hours per day and in general do, well, absolutely nothing.
The problem is their digestive system isn't any faster than they are. They don't make waste very often and it can take forever for them to digest even the smallest meals. This results in a significant amount of their body weight taken up with stored waste, which should, but for an evolutionary adaptation, make it hard for the mellow creatures to use their lungs.
But researchers out of the University of Swansea working at the Costa Rica Sloth Sanctuary have discovered how the sloth can still breathe with all that weight pressing down. The creature has evolved abdominal adhesions that hold in place organs such as the liver and stomach. So the sloth can be upside-down and those organs don't come crushing down.
Thanks to the adhesion, sloths can conserve precious energy when they're in the mood to invert, and their breathing isn't impaired during their busy days. Neat trick!