Masking Their Scent
One explanation for why dogs roll in the grass is an ancestral instinct to mask their scent.
Marking Their Territory
Rolling in the grass to leave their scent can be a way of telling other dogs that this territory belongs to them.
It Feels Good
A soft patch of grass might simply feel good to your dog. It is a chance to stretch out, rub their back, and soak up some sunshine.
Expressing Their Personality
This is an interesting reason you may not have thought of before. Some dogs may roll in the grass as a way to express their personality.
Getting Rid of Objects in Their Fur
There can also be a practical reason for your dog to roll in the grass. Often it helps them to get rid of something on their back.