Click the Rotate icon in the device header.
If the device is too small to display the device header, click the 3-dot menu and select Rotate.
To change the orientation of all devices simultaneously, use the Switch all to landscape and Switch all to portrait buttons on the right section of the Workspace Toolbar.
Only mobile devices such as smartphones and tablets will rotate with these switches—desktop and laptop devices will stay in their default orientation.