I have a mild version of it now, only happens if lying back on GP exam table, and the dentist chair, and if I turn over quickly in bed - which I try not to do now. I had Menieres disease a few years ago and occasionally get the symptoms even now.
But if it's sudden like yours OP, sounds like positional vertigo or similar. You can get tablets called betahistine which don't always work but are worth a try, if GP diagnoses vertigo.
There's a thing called the Epley Manouevre which resets the crystals in the inner ear, if that's the cause of it.
I am not a medic, but I know all this because I went through it all with the Menieres diagnosis.