Mike - if it helps, if we think we are loosing our minds, then we allegedly are not! It's those that don't think they are, that are really mad!
I think I am going mad when I think too much - sometimes my mind is just too active.
Nightmares are a way for our minds to try and make sense of things that happen, even if we don't understand them.
If you wake from a nightmare, instead of going through the dream over and over, try and think of something good that has happened and try and think of that instead...it takes practice. I developed a mantra, where I would repeat the words peace/calm in a slow quiet voice..it can work!
Best wishes ...Rik