This could also apply to any character with the ability to hide.
I've noticed that when I loot a corpse, there is a small delay between /loot and the loot window appearing. You can use this small delay to your advantage. Simply target a corpse, put "/loot" in your command line, but do NOT hit enter yet! Put your mouse over your hide button. Now, as soon as you hit enter to use the /loot command, during the small delay before the loot window pops up, hit the hide button with your mouse! Poof, you'll hide *before* you loot, and you'll be hidden while you loot! I've used this technique several times to loot corpses. After you're done looting, you'll still be hidden, so if you were already sneaking, then you can simply slip away with the loot.
This can also be used to buy/sell with merchants in hostile territory... ;)