You say it smelled like a sewage plant - do you mean it smelled like really nasty rotten eggs? If so, that's sulfur you're smelling. When you have a sand substrate like that, waste materials can get trapped in anaerobic pockets. This means that no water is flowing in that part of the sand, and therefore there's no oxygen being brought to the area. As a result, normal bacteria (the kind that break down decaying materials into nitrite and then nitrate) cannot survive in these areas and anaerobic bacteria start to take over. These bacteria don't need oxygen to survive so they can live in these "dead spots" in your sand. One of their metabolic byproducts is hydrogen sulfide, which smells absolutely terrible but is also highly toxic to your fish. If you don't keep your sand stirred on a regular basis, this gas can build up under the sand. If something then disturbs the sand bed, the gas is released into the water and you can lose a lot of fish. I suspect this is what happened here.
In the future, whenever you use a sand substrate it's best to keep it stirred on a regular (weekly) basis. Do this yourself during water changes, or get some kind of burrowing creature that will do it for you (Malaysian trumpet snails are a perfect choice).
4 8 15 16 23 42