it sounds like you are suffering from a common condition called bppv or "benign paroxysmal positional vertigo". it happens when special sensory cells in your balance organ, or inner ear are abnormally stimulated by tiny crystal debris that sometimes collects in the balance canals and moves when you move your head (ex. turn over in bed), bend down or get up. it is common for patients to wake up with it.
dizziness pills don't really work for bppv.
bppv is diagnosed with a special maneuver called dix-hallpike. at the same time the doctor can cure your vertigo with something called epley maneuver which is nearly 100% successful if done right.
sometimes epley needs to be repeated down the line, but you should get immediate relief.
all the best.