First, as Glabe describes, sand should be well washed/rinsed to remove fines (dust like particles of sand). Many have success with play sand. I am using [well rinsed] pool filter sand. You 'can' use a depth of 1", but I prefer deep sand of around 3" or a bit more as it makes for an excellent bio-filter. A key is to LEAVE SAND UNDISTURBED as much as possible so detritus/mulm stays on the surface. If organic matter gets stirred deep in sand, anaerobic decomposition can occur creating 'black sand' and hydrogen sulfide gas.
Some believe that Malaysian Trumpet Snails prevent this, however, MTS require oxygen and only burrow in the upper inch or so where oxygen is already plentiful. It is best to leave sand undisturbed!
The best part about sand is that unlike gravel, detritus/mulm collects on the surface and there is rarely any uneaten food. The detritus can be left to slowly decay (and feed plants if they exist) or can be easily removed by hovering a siphon just above the surface.
I've used gravel and switched to [deep] sand and find that sand is much better. Some of this may be due to the nature of pool filter sand as some sands are perhaps too fine grained and compacts making it less effective for a deep sand application.
Footnote: Deep sand was fist pioneered by our salt water hobbyist friends where live sand and live rocks are essential tools in reducing unwanted nitrates.