Roly poly bugs, or pillbugs as they're also known, feed on many kinds of organic matter, including fungi, algae, moss, bark, seedlings and decaying plants or animals. They're considered to be omnivores, meaning they eat plant or animal matter indiscriminately. Pillbugs are capable of switching to a scavenger diet when necessary, such as during a dry spell. Roly polies aren't picky eaters, and their diet depends largely on their surroundings.
In the zoo, some common foods fed to roly poly bugs are monkey chow, romaine lettuce, apples and oranges. As cannibals, roly poly bugs also prey on each other. Roly poly bugs feed nocturnally, emerging from their underground burrows at night to find food. Because they often feed on the eggs of pests that harm crops, they're beneficial to gardens. Pillbugs also help with natural decomposition by ingesting and excreting organic matter that enriches the soil.
Roly poly bugs also feed on their own excrement. When pillbugs excrete waste, they lose a small amount of copper, which is an element that they require to live. Using a practice known as coprophagy, pillbugs consume their feces to preserve this critical resource. Additionally, pillbugs can drink water through their anuses and do not urinate.