I also do what others have suggested: -
Flush black tank
Flush gray tank (on same connector)
Hook up (separate, dedicated for the purpose) hose to sprayer/flush inlet
Let it run for a minute until mostly clear
Close black tank valve (for 1-2 mins, never longer) with the sprayer still running
Open black tank valve, and let it flush until clear
Close black tank valve
Go turn off water straight away (in this order so that I get 1-2 gallons of water left in tank).
Unfortunately my 2nd black tank (for the bunk-room half-bath) doesn't have a sprayer so I've just been cleaning by dumping, running faucet for a while, and then dumping again.
I'm not really familiar with the toilet wands that I've seen mentioned.
I did think about either trying to retro-fit a sprayer to the 2nd tank (tho' I'm not keen on the idea of messing about with the black tank), or buying one of the extra valves that milvet33 mentioned (but they don't seem to do any more than just closing the valve and flushing the toilet a few times).
I thought this video comparison of tank cleaning methods was pretty interesting: -