So, to get it right. Arata was having an out of body experience while sleepwalking cause by a ghost attempting to posses him, right?
I wonder if Senpai felt something happening to his plaything and came rushing in to the rescue. Otherwise it's way too lucky of a coincidence for Arata