Are you physically rotating the monitor to a portrait orientation? Windows itself should handle that with its display orientation settings which will then adjust the desktop and MameUI interface to vertical. Then you can use the auto-rotate functions of MAME.