It's pretty easy!
First of course you need to make sure that all the floating particles are gone. This is easily achieved with by thoroughly washing the soil and sand before hand.
Then here's the secret. After you've finished setting up your tank, (you'll want to put substrate first then plants and hardscape) you crumple up some newspaper balls and put them into the tank. Get them into all the little cracks and crevices but make sure it's just resting there. Don't stuff it in as you want to be able to take it out easily later. Try and get a layer across the whole tank. Afterwards put a plate, or a sheet of glass or hard plastic on top of the newspaper. Then pour the water in VERY GENTLY. It will take forever, if you have a large tank, but in the end you'll have a perfectly intact aquascape with nearly completely clear water!
All the aquascape articles I've read talk about finding inhabitants that will not mess the arrangement. I've found that CFBN are perfect for this! I have noticed they will never push something out of the way, even if they are strong enough to do so
Read this article! It's helped me so much in terms of setting up a beautiful tank.
Aquascaping a Planted Aquarium