Here the word "him" refers to the demon-possessed man.
The demon is the one who is crying out, not the man.