There are a couple of ways you can do this for smaller tanks you can drain the water out and add sand then place rocks and water back in run a tandum filter to help clear it up, reacclimate the fish , then add fresh saltwater to your tank , water change done in the process , you will have a bit of diatoms but they will disappear on thier own . Do watch for a small cycle and have water at the ready for a water change should your tests indicate . For a larger tank mark off sections take that out add your sand keep going till it is changed out , do this at water change time this will help you to get the floating particles out .