شروط الصلاة
Marthad al-Ghanawi (may Allah be pleased with him) reported: The Prophet (may Allah's peace and blessings be upon him) said: "Do not pray facing graves and do not sit on them."
عن مَرْثَد الغَنَويّ -رضي الله عنه- عن النبي -صلى الله عليه وسلم- أنه قال:«لا تصلُّوا إلى القُبُور، ولا تجلِسُوا عليها».
شرح الحديث :
The Prophet (may Allah's peace and blessings be upon him) forbade praying towards graves in such a way that the person praying is facing in the direction of a grave and he forbade sitting on them. This also includes debasing them by putting one's feet on them or relieving oneself on them. All these things are unlawful.