My mom once was getting ready for work and I hear a pop and hear my mom yelling. I go in and her necklace fell off the dresser; a "dust buster" wall wart was plugged in back there and it fell across the prongs, shorting it out.
edit: Not code, just convention.
The more practical reason to mount ground down is that wall warts with ground pins or polarized prongs nearly universally arrange them so that they're hanging down when inserted into a ground-down plug. If the plug's flipped, the wall wart's upside down and its weight is trying to lever it out of the wall.
TBH, in the house I mount them ground down, but under cabinets or in the garage/shop or etc I mount it ground up.