Not all energy produced by producers is consumed by herbivores or other consumers. Some of the energy is lost as heat, while a portion may become stored in organic matter as dead organic material or waste. Decomposers play a vital role in breaking down this organic matter, releasing nutrients back into the ecosystem and completing the energy cycle.