Unless you want to take all your water and fish out before changing the substrates, you will have to do it with everything in place. I have changed substrates before without removing water or fish, it makes a complete mess of the water but if you do it gradually and carefully, it doesn't cause any problems. Just remember to turn your filters off when you are adding the sand, if you don't, they will probably suck quite a lot of sand up.
It may be easier if you remove some of the water. It'll be okay to turn everything off for an hour, your bacteria will not suffer too much.