When you are awake, the muscles in your body are always at least a little tense to keep your body in your current position. Even when you lie down (while awake) you will usually not be completely relaxed, but holding yourself "in place".
When you begin to fall asleep, your muscles relax, and depending on the position you were in, part of your body will follow gravity and begin to sink from the "tense" wakeful position into a relaxed posture. Your body notices this involuntary movement of your body parts (you may even dream of a falling sensation or some movement) and startle you awake, often with a sudden countermovement to "catch" what your subconscious perceives to be a dangerous "fall".
If you fall asleep at your desk, as you seem to do, you may well knock over something on the table in front of you, when your arms jerk forward to prevent you from falling.
It happens to all of us, except that most of us go to bed to sleep ;-)