Sayyiduna Ibn Abbas (may Allah be pleased with them both) said: The Messenger of Allah (peace and blessings be upon him) said: "Do not pray facing a grave, and do not pray on a grave."