Hiya,
I cant say that I have experienced this but I can relate to not being able to get to sleep. Meditation works for me. When you are laying in bed, slowly start by turning off each limb in your mind. As you turn off each limb, allow yourself to feel it get heavier. Then your abdomen followed by your chest. By this time, your mind should be ready to turn off.
As for the bad dreams, I would talk to a doctor about that one. If the meds are causing it, you might be better switching meds to get some sleep.
Darren