The spasms probably weren't real. And the devil definitely wasn't! Those are called hypnagogic hallucinations.