Great advice above. If you have the time to do it, this can start weeks/months in advance. Make sure to blast your rock out of as much detritus as possible (a power head with hose attached is great for this). Also siphon and clean the dickens out of the sand bed, one section at a time so you don’t crash your tank. Just before your move, the tank should be the cleanest it’s ever been. When it comes time to move things, the amount of crap stirred up should be minimal and will help prevent a huge cycle/spike in the new tank. Probably feasible for a tank under 120G, and should be pretty easy for small and nano sized tanks.If it is full of detritus, definitely strain that out. If you can do it in a tank full of water, you can just stir it all up, pile to one side, siphon off nasty water and place in the new tank. I have had lots of luck with that method reusing sand. If it is really bad repeat with more water and use a straining device to remove the sand from the dirty water you stir it in. Sand is sand. Water costs too, for most, so that is how I would decide (what is logistically sensible)