Where others see only banana peels and moldy bread, some lawyers envision opportunity under a state law taking effect in October that mandates recycling of food waste.

Many environmental lawyers seem only remotely aware of the new law, but some proponents expect it to generate work for attorneys advising food-recycling operations and businesses—such as supermarkets and hospitals—whose waste ends up in landfills.