It sounds like it was a hypnagogic jerk.