1,288. Graves Not to Juxtapose
199:5 We don't place coffins one on top of another unless there is at least six handbreadths of dirt in-between.
199:6 We don't bury an evil person next to a righteous person as per Psalms 26:9, "Do not gather my soul with sinners." We should not even bury a thoroughly evil person next to a less evil person. Similarly, we don't bury a righteous person, and all the more an average person, next to a person who was exceptionally pious. If two people hated one another, they are not buried next to each other because even in death they would have no rest together.