You need to wait until your game changes seasons to Autumn. Then the leaves will cover up the ditches and you can walk on top of the leaves to get the items.
Sometimes you'll fall into the leaves and need to squirm to get out, not unlike the bog in Route 212 (I think?) in Sinnoh.