Hi. Long ago this was a problem, but I haven't seen it for a while. The problem is that a phone app somehow locks the screen in portrait mode. It didn't happen all the time, so it was flukey. You can tell a phone app because it displays in portrait mode, with 1X or 2X in the lower right. The only know fix is to restart the iPad, like this
1. Press and hold the Sleep/Wake button until the red slider appears.
2. Drag the slider to turn your device completely off.
3. After the device turns off, press and hold the Sleep/Wake button again until you see the Apple logo.
See if you can identify which app causes it to lock.