Cemeteries, just like housing, have become overcrowded. [Our family] has owned a cemetery for over sixty years. Our numbers have grown to include more than twenty families, at the rate of six persons per family, and our cemetery no longer suffices the number of dead. Is it permissible to enlarge the grave to include multiple levels to suffice the [number of] dead, given that the cemetery is limited in space and is surrounded by buildings on all sides, and there is no alternate land.
It is legally established that each body must be laid down separately in a separate lahd [grave with a lateral hole] or shaqq [a simple trench dug down in the middle of the floor of the grave], except when the graves become full. The Prophet buried two or three of the martyrs of the Battle of Uhud in a single grave. Men and women must also be buried separately.
Based on the above, and in reference to the question:
When necessity calls for burying more than a one individual in a single grave, it is permissible to construct multiple levels inside the grave to accommodate the increasing number of dead.
And Allah Most High knows best.