Hover the vacuum a few centimeters above the sand and in a slant position to prevent the sand from being sucked into it directly. The waste material usually is lighter and will stay visible above the sand so it should be easier to clean it up. Stir the sand when you vacuum to prevent it from getting compact that anaerobic pockets will form which if disturbed can release hydrogen sulfide, a very dangerous gas that may cause acute respiratory problems to your fish.