Complex sentence: When both of them are in there, they (and Chloe who suddenly appeared) realize that he is not a corpse and assume he is sleeping and they try to devise a way to wake the person up.
Split into simpler sentences: When both of them return there, they (and Chloe who suddenly appears) realize that he is not actually corpse and assume that he is sleeping. They then try to devise a way to wake the person up.