It is illegal and reprehensible to build a house on a grave. The gravediggers are insulted by this act. Even sitting on a grave is a heinous act. The Prophet (peace and blessings of Allaah be upon him) said , “ Do not pray to the graves and do not sit on the graves. (Muslim , H / 2122) Ibn Taymiyyah (Rah.) Said , the jurists agree that mosques, houses, etc. can not be built on the grave . Because the Prophet (peace and blessings of Allaah be upon him) forbade it. (Majmoo 'Fataawa 22 / 194-95) On the other hand, if the tomb is very old, then you can bury it in the ground and level it by leveling the tomb and building a house on top. (Fathul Qadir 2/101 ; Fatawa Hindi 2/471 ; Albahroor Rayek 2/195 ; Fatawa Tatarkhania 2/165 ; Fatawa Bayaziyah ; Majmoo 'Fatawa 22 / 194-95)