Personally, I have moved a 2 year old sand bed into a larger tank along with the inhabitants and it didnt seem to affect anything. However, if you have some sort of power filter, run it with lots of carbon to remove as much stuff as you can just before putting your inverts into the new tank. You will want to allow time for the temps of the two tanks to even out anyways, so this will allow you some time to run the filter.
Honestly, if your sand is less than 1" or so, you shouldnt have any problems. After you take everything out of the 5 gal, leave a couple gallons of water and the sand and just stir it and stir it. Do this for a minute or two and then remove the sand leaving the dirty water behind.
If you want to be SUPER cautious, you can use all new sand in the new 10, and just seed it with a cup or two of the old sand.
HTH,
Jesse