From what I’ve learned from experience is that it is caused by an imbalance of fluids in your ears. Usually temporary, at least in my case. Several years ago I got up in the middle of the night to drain and get a drink of water. Something I do every night, but on this particular night as soon as I stood up the entire room started spinning. I tried grabbing at the door frame, but missed and grabbed the lamp on the night stand. Somehow I managed to keep from falling and hitting my head. I landed on the bed. It scared the crud out of me. I went to the Dr the next day, who also has been my Dr since around 1980 and is also an AME. Very convenient. He explained that it was an imbalance of fluid in my ears and most likely temporary, but he said No Flying for Two Weeks. Actually, he did not have to tell me that. I was uncomfortable driving the one mile to the Dr’s office. No way was I going to fly. I can’t remember if I had a follow up visit or not. I waited a good 3 weeks before I flew again. It’s happened a few times since, maybe once every other year or so and never as severe as that first time. That first time lasted for hours and nearly made me sick. The last time only lasted for a few minutes and was no where near as severe as the first time.
He did not send me to a specialist nor did he prescribe anything. I can’t remember the last time I experienced vertigo, but it was very mild lasting only a few minutes. This is just my experience.