Well we don't lean the panels against the wall either. All equipment has to be securly mounted.

The building code defines these things and in a seismic area the rules are stricter often requiring snubbers and seismic rated anchors etc.
2-118 refers us to Appendix G which are the many Building code references.

I can tell you that they must be secured but it surprises me that the rule that says so is not so easy to find and I will be looking.