We recently had an opportunity to fix a Windows 10 laptop that was rotating the screen 90 degrees at random times. We found these steps in order to fix the problem:
Steps to turn Autorotate on/off
- Click the Start menu and select Settings.
- Click System.
- Click Display.
- Scroll down and toggle Lock rotation of this display to ON/OFF.