Get your oxygen saturation level checked, especially by use of a recording Oximeter.
Some of us own a personal Oximeter that just displays current reading - very inexpensive. If you have it handy when you fall asleep and make a quick test when you wake up you may learn something. It worked for me and led to me discussing with my Primary Care doctor. Her ordered/prescribed an overnight at home recording oximeter test - this confirmed I suffer from low oxygen stat when sleeping. The above can be done at minimum expense even if one has to pay out of pocket.
I underwent further and high cost testing and was diagnosed with mild Obstructive Sleep Apnea. I have been working on losing weight, have lost about 15 pounds, and have greatly reduced my symptoms, similar to your symptoms. I was not obese, about 245 at 6' 6" I'm working on getting down to 225. I think this will make it unnecessary for me to use a CPAP breathing aid when sleeping. So far I am doing much better.
If any of this fits, you can't hurt yourself by trying my approach. You may find the problem. The problem is unlikely to go away on its own.
Dizziness when lying down can be due to BPPV or Meniere’s disease. BPPV (benign paroxysmal positional vertigo) is caused by problems in the inner ear. Its symptoms are repeated episodes of positional vertigo which is a spinning sensation caused by changes in the position of the head. It can also cause diminished hearing and tinnitus.
Third possibility can be of cervical spondolysis which can be caused by wrong ways of sitting like inappropriate position while using the computer.
Consult a sleep specialist and a physician to get evaluated for these possibilities.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.