Imam Ali (a) reported: ‘Sprinkling water over graves was practiced at the time of the Holy Prophet (saww)’.  

(Wasa’il al-Shia Vol. 3 Pg 196)