Abu Marthad reported: The Messenger of Allah, peace and blessings be upon him, said, “Do not sit upon the graves and do not pray towards them.”
Source: Ṣaḥīḥ Muslim 972
Grade: Sahih (authentic) according to Muslim
عَنْ أَبِي مَرْثَدٍ الْغَنَوِيِّ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لَا تَجْلِسُوا عَلَى الْقُبُورِ وَلَا تُصَلُّوا إِلَيْهَا
972 صحيح مسلم كتاب الجنائز باب النهي عن الجلوس على القبر والصلاة عليه