Hi and welcome to DreamViews

That jerk that you had is known as hypnagogic jerk, which is usually caused when a person is exhausted or are uncomfortable.