I can try and explain the incidence from a medical perspective, as the parapsychological explanation (ghost) given by you does not have much scientific validity. If there are thoughts that someone has entered in ones body, this could also be at a delusional level, due to some neurotransmitter imbalances in our body thus resulting in the disturbances. And a correction of the chemical imbalance improves the condition. I suggest consult a psychiatrist to rule out medical problems.