(Psychological / emotional perspective)

If in a dream we receive what seems to be an electric shock it shows we are not protecting ourselves from danger and need to be more aware of external events.

A sudden jolt can either be destructive or bring us back in line.

The muscle jerk as we fall asleep might be interpreted by the dreaming mind as an electric shock.