«لَا تَجْلِسُوا عَلَى الْقُبُورِ، وَلَا تُصَلُّوا إِلَيْهَا».
[صحيح] - [رواه مسلم] - [صحيح مسلم: 972]
المزيــد ...
Abu Marthad al-Ghanawi (may Allah be pleased with him) reported: The Messenger of Allah (may Allah's peace and blessings be upon him) said:
"Do not sit on graves, and do not pray towards them."
[Authentic hadith] - [Narrated by Muslim] - [Sahih Muslim - 972]
The Prophet (may Allah's peace and blessings be upon him) forbade sitting on the graves.
He also forbade praying while facing the graves if the grave lies in the direction of the Qiblah for the praying person because this is one of the means leading to polytheism.