The gentlest method is to carefully remove the top 1/2" of sand (a plastic sand shovel will do fine!) trying not to cause a lot of horizontal trauma. Set aside.
The rest of the sand can be moved more forcefull; there's little life in it. If it really smells bad, toss it out.
I like having sand for various sandbed worms and other critters which do a nice job cleaning up detritus, but for this you rrally only need an inch of sand. If you are attempt to use a deep sand bed for detritification, I'd suggest Calfo's remote DSB method. It's kept in the dark and mostly lifeless save for bacteria. If it gets smelly (i.e. polluted) you can just replace half at a time.