All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His slave and Messenger.
Pouring Zamzam water or any other water inside the grave is not an act of Sunnah; however, it is allowed to sprinkle water over the grave after the burial to settle the dust. The prominent scholar Ibn ʻUthaymeen was asked, “Does sprinkling water over the grave benefit the deceased?”
“It does not benefit the deceased, and if someone did that while believing that such an act is part of the teachings of Islam, then this belief is incorrect. In fact, water is sprinkled over the grave (immediately) after the burial so that the soil would settle and would not scatter because of the wind or any other cause. This is the reason for sprinkling water over the grave after the burial. The deceased does not benefit from the water sprinkled over the grave nor does it reach him, and his body is in no need of water.” [Fataawa Noor ʻala Ad-Darb]
Allaah knows best.