I think nightmares are somehow related to your actual emotional state. I had my worst nightmare when my grandmother died and my girl left me. It was terrible, but now i'm okay, and i don't have any nightmares a long time ago.