The Prophet said: "Do not sit on the graves nor perform Salat towards them."

Jami` at-Tirmidhi Book 10 Hadith 86

Jami` at-Tirmidhi #1050

The Book on Jana''iz (Funerals) 10:86

Abu Marthan Al-Ghanawi narrated that:

The Prophet said: "Do not sit on the graves nor perform Salat towards them."

Chapter: What Has Been Related About It Being Disliked To Tread On Graves, Sit On Them, (And Pray Towards Them)

Grade: Sahih (Darussalam)