They help to keep the sand in reef lagoons and seagrass beds fresh by turning them over, and by feeding on the dead organic matter that's mixed in with the sand, the nutrients they excrete can re-enter the biological web by algae and coral. Without the sea cucumbers, that sort of nutrient recycling could not occur.