Earthworms allowed to feed on live plants gained weight, and their performance would vary depending on what plants they were offered, such as legumes or grasses, suggesting they do derive nutritional benefits from such a diet.
BBC: Earth News - Earthworms eat live seeds and plants, scientists find