All people dream. So do dogs, cats, cows, horses, primates, pigs... Medically speaking, the thought life of the brain is in a state of suspended animation. The will is not active, which is why an impure dream or dream of other sinful behavior cannot be held to person's soul. Dreams are often a series of disjointed memories that come together to create a virtual reality. God certainly CAN direct dreams, but this is the exception when He wishes to communicate with us. Unless a person has compromised his spiritual integrity by mortal sin, especially by sins against the first, sixth and ninth commandments, it is unlikely the devil is the cause of bad dreams. Victims of sɛҳuąƖ abuse or those who have experienced severe trauma may suffer from nightmares. In this case, I will not harm to consult a priest. Some people remember dreams in fine detail, others, not at all. So long as one doesn't place trust in his dreams and live according to them, no Freudianism is involved. If, after consulting a priest, practicing good sleep habits, nightmares continue, a neurologist should be consulted and a sleep study done. Often, bad dreams are a "side effect" of certain medications. Two notorious offenders are Norvasc for high blood pressure, and trazodone, a muscle-relaxant.
Be sure to "get ready" for sleep with a warm bath, putting salts or lilac extract in the water helps. Be sure to offer up your sleep to God. Seep with a Rosary in case you wake up in a panic. If you can't pray, finger the beads. Sprinkle holy water on the bed before getting in.
Don't eat or drink within two hours of be time, but keep a glass of fresh water beside the bed. Sip as needed. Make the room dark with curtains or shades. Play very low, soothing music or
get a white noise machine.
Persevere! Pray! Sweet dreams!