Window units should never be installed or operated on their vertical side or even slanted more than five degrees. Doing so significantly increases pressure on all moving parts, shortening their lifespan.
A window AC unit must remain upright for two reasons: the drain tubes that transport condensation to the exterior of your home will not work effectively, and it will damage the compressor, which will quickly fail.
A sideways installation also increases the drain of water caused by condensation out of the system. It can result in leaks around your AC unit or inside your home.