Sunan an-Nasa'i, Book 9, Hadith 19 (Nasa'i 762)

It was narrated that Abu Marthad al Ghanawi said:

"The Messenger of Allah(ﷺ)said: 'Do not pray toward graves and do not sit on them.'"