usually when I have dreams like that I start tireing myself out madami so they don't happen. Those kinds of dreams happen to me because I stay up watching TV till 3 am. I'd try getting madami tired out.
It may be the things you ate or the activities you did. Stop eating basura food, specifically late at night. basura pagkain and unhealthy pagkain cause you to dream, with mostly bad dreams. Also, try not to exercise hard at night, because heavy activity can also lead to bad dreams. Don't watch scary pelikula either, because dreams are your subconscious producing images, and whatever you think about, will cause you to dream about those particular thoughts.