(deep sand bed) is used in a SW
tank to reduce nitrates down to Nitrogen. Like Mike said, the lower layer of sand is depleted of oxygen and harbor anaerobic bacteria that feed on nitrates and reduces them to Nitrogen which bubbles out of the AQ back into the air. There are problems with this and it's not advised that you stir or disrupt it. Some snails, starfish and gobies tend to stir the sand bed to prevent dead spots which appear as Black spots.
Wow, that was a mouthful!