is what you may be experiencing. It is called Benign Postural Positional Vertigo (BPPV). Tablets like Vertin
may help you but it is a prescription drug.
The cause has to be confirmed a clinical examination of you.
It may also be due to low blood pressure. Please get it checked as well.
If it is a onetime occurrence, you may safely neglect it.
Watch for repeat attacks in future.
Hope this helps.
Get well soon.