Stress is definitely a contributor too. If you train your brain to lucid dream, you can sort of stop nightmares in their tracks though - it's commonly used to treat PTSD-induced nightmares. Which, I don't know what was going on back home for you, but I feel like most everyone who arrives here has a touch of PTSD.