If you suddenly find yourself looking at your desktop sideways or it is upside down, chances are you've run into a "feature" built-in to several graphics card software.
The easy fix is to hold CTRL-ALT and while holding those, press one of the directional arrow keys on your keyboard. Here is a list of commands and their results:
CTRL-ALT-UP ARROW = Upside-right/Normal screen
CTRL-ALT-DOWN ARROW = Upside-down screen
CTRL-ALT-RIGHT ARROW = Screen turned on it's side to right
CTRL-ALT-LEFT ARROW = Screen turned on it's side to left
Note: You do not have to cycle through these! Simply press CTRL-ALT-UP and your screen will return to normal, regardless of its current state.