Many medications, indeed most medications, used as sleep aids suppress REM sleep. If you take these for a period of time, then stop taking them, you will experience a phenomenon known as REM rebound. This is why you experienced such a large number of intense nightmares after coming off of the...