You might thiamine deficiency. (Vitamin B1)

I had thiamine deficiency due to malabsorption. Sleep Apnea is a dysfunction of the automatic nervous system. You might also have painful calf muscles in your leg and weak, shaky muscles. I also had a problem with visual accomodation (when looking at something close, then looking at something far away, it would take a few seconds for my eyes to be able to focus).

I've had to take oral thiamine of 100mg per day for years. It significantly reduced my joint pain as well.

Ryan