Sloths are the quintessential couch potatoes of the rainforest, and these sluggish tree-dwellers also serve as a hotel for moths and algae.

Three-toed sloths descend from the trees once a week to defecate, providing a breeding ground for moths that live in the animals' fur and nourishing gardens of algae that supplement the sloths' diet, new research finds. Leaving the trees burns energy and makes sloths easy prey for predators, but the benefits of a richer diet appear to be worth the perils.

"Important interspecific interactions — between sloths, their moths and algae -— seem to be reinforcing, or even dictating, important aspects of sloth behavior, especially their ritualized behavior of descending the tree to defecate," wildlife ecologist Jonathan Pauli of the University of Wisconsin-Madison, leader of the study published today (Jan. 21) in the journal Proceedings of the Royal Society B, told LiveScience in an email. [Daring Duos: Photos of Unlikely Animal Friends]

Very few mammals are tree-based herbivores. Such animals must be small and light enough to perch in trees, but large enough to digest a lot of plants, because plant matter contains few digestible nutrients.

Sloths, known in Spanish as los perezosos ("the lazies"), have evolved adaptations to the constraints of life in the trees. Two-toed sloths have relatively large home ranges and consume a varied diet of animal matter, fruit and leaves. By contrast, three-toed sloths have much more limited ranges, and eat only leaves. They have the slowest digestion rates of any mammal and expend very little energy at rest.

Pauli and his colleagues thought they knew why these tree-dwellers come down from the canopy to relieve themselves.

"We hypothesized that this behavior sustains an ecosystem in the fur of sloths, which confers cryptic nutritional benefits to sloths," the researchers wrote in their journal article.

Pauli and colleagues captured two-toed and three-toed sloths near San José, Costa Rica, and counted the number of moths, as well as the amount of nitrogen, phosphorus and algae in each animal's fur. The team also collected digested material from the sloths' forestomachs, where food collects right after it's swallowed, to see whether it matched algae in the fur, which would indicate the sloths were consuming it.

The researchers found more moths in the fur of three-toed sloths than in that of their two-toed relatives. In addition, the team found larger amounts of inorganic nitrogen and algae in the fur of the three-toed sloths. The algae in the sloths' forestomachs also matched that found in their fur.

When the sloths relieve themselves, their insect tenants lay eggs in the dung, which later hatch and fly up to recolonize the sloths. Fungi in the sloths' environment may be decomposing dead moths, fostering the growth of algae. Or, the moths may be directly transferring nutrients from the sloth dung to their fur, where algae can grow.

The sloths consume the algae, which is rich in fatty compounds and gives them energy. In addition to being a tasty nutritional supplement, the algae may serve as camouflage against predators from above, such as the Harpy Eagle.

The symbiotic relationship among sloths, moths and algae could explain why it's hard to keep three-toed sloths well nourished in the highly sanitized environments in captivity.

Follow Tanya Lewis on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on LiveScience.