Small doses of melatonin should be more than sufficient to deal with this, buyable from any pharmacy. Ask for advice there on how to take it. It sounds like you're suffering from a hypnic jerk, very common in healthy people. That'd be my first port of call after the usual meditation, relaxation stuff. If problem persists, that's when to see your GP.
if you go straight to a GP, they may prescribe any number of things. It seems in vogue to try people on small doses (often 10mg or as much as 50mg) of SNRIs at the moment like mirtazapine, but I'd avoid that unless absolutely necessary. There's no recreational benefit to those and they can be addictive if used in the longer term even at small doses.