I don't think the code specifies which way is up (and I'm referring outlets, not the code in a general sense :laugh
. I'll toss out a "this is electricity not electronics" caveat here though.
Now I have heard that when the 3 prong grounded outlet was introduced, the intention was that the ground pin be up. That way, some wire sliding down the wall would hit ground and not hot. But there was an uproar because the "little face was upside down", and so now the default is outlets all in their places with bright shinny faces and the ground prong down.
I have some LED night lights, and they are designed so that the ground is down. Gratuitous night light photo posted to make Randy happy (he likes pictures). You can see where the LEDs are in the top, and they sorta point down. Side note: I've got about 20 of these, and a 3.5 years of operation 3 are dim enough they need replacing. LEDs only have 100,000 hour life if they are properly heat sunk.
In my house, I put the ground down so I wouldn't have to explain to everyone why it's up.