Certain sleep disorders can cause this to occur such as insomnia, narcolepsy, restless leg syndrome, and sleep apnea.
Sleep Disorders: Waking up often during the night means you are interrupting your sleep cycles and are more likely to remember what you were dreaming.
They have also been shown to impact sleep and contribute to nightmares. Beta-blockers are medications that treat high blood pressure and cardiovascular disease. One of their side effects is that they can cause vivid dreams due to the effect they have on REM sleep. Anti-depressants are medications that can help relieve the symptoms of depression.
Medications: Some medications have been shown to cause vivid dreams.