Your cats may roll on rocks for several reasons. The rough texture provides sensory stimulation different from grass. Rolling deposits scent from glands on their paws and cheeks, marking territory. It can help distribute oils and remove loose fur during grooming. It may also be playful behavior, and rocks can retain heat, offering a warm spot in cooler weather.
Cats have individual preferences, so your cats may simply enjoy rocks more than grass. If you are concerned, consult your veterinarian to rule out medical issues.