Your iPhone or iPod touch screen does not rotate as expected, and may appear to be stuck. ... If the screen remains locked, back up and restore your device.
support.apple.com