It sounds like it might be PTSD related. My brain often works out things in my sleep, especially if it's something I can't deal with in my waking hours. Do you have a therapist that might help you figure out what's going on? It does not sound medical related to me, but a trip to the medical Dr. to rule out that side of things might be a good first step.
