I like to do it, a little at a time, in a dish pan. It's not the fastest method but the sand will be really clean. This saves you the bother of having to clean the filter out later and avoids the risk of damaging an impeller, if you have a HOB one.
I clean any new sand or gravel in a bucket with flowing water to rinse away the dirt and super-fine particles. The end result is a material that does not cloud my water much. I use mostly sponges and canisters so grinding up a HOB is not a real issue for me.