From a heat exchange point of view, (when the unit is placed bottom down as usual) cool air is pulled in through the bottom by the blower fans at the top then exhausted out the top back. This is ideal.
Heat naturally rises, so having the fans sucking air at the top of the case is the best design from an airflow perspective.
If the airflow is fast enough, it won’t matter what orientation the computer is in, but if natural convection (rising heat) was part of the cooling design, then running the computer while on its side would be less than ideal.
Mac Minis are crammed into server racks on their side with no issues, so I’d be surprised if the same couldn’t be done with the Mac Studio