Riyad Us-Saliheen (Gardens of the Righteous)
Chapter 342
Prohibition of facing the Graves during Salat (Prayer)
1757. Abu Marthad Kannaz bin Husain (May Allah be pleased with him) said: I heard the Messenger of Allah (PBUH) saying: "Do not offer Salat (prayer) facing the graves and do not sit on them.''
[Muslim].
Commentary:
1. It is prohibited to face the graves while offering Salat. Its reason seems to be that it creates a resemblance to polytheists. Moreover, it has a trace of reverence for someone other than Allah, which takes one towards Shirk.
2. It is forbidden for Muslims to sit on the graves because it is disrespect of man whom Allah has honoured.
Therefore Muslims should avoid both practices mentioned above. Imam An-Nawawi said: Our companions (the scholars) said that it is Makruh (undesirable) to plaster the grave; while sitting, leaning against it or resting on it is Haram (forbidden).