The Messenger of Allah ﷺ said, "Do not pray toward graves, and do not sit upon them."
أخبرنا علي بن حجر قال حدثنا الوليد عن ابن جابر عن بسر بن عبيد الله عن واثلة بن الأسقع
قال رسول الله ﷺ لا تصلوا إلى القبور ولا تجلسوا عليها
Muslim narrated it in the Book of Funerals, chapter on the prohibition of sitting on a grave and praying towards it, h: 972, from Ali bin Hajar through the same chain, and it is also in Kubra, h: 836.