How come I have obstructive sleep apnea, but nobody else in the family has it?

Not hereditary. Sleep apnea is not a hereditary condition. It is not surprising that you are the only one in your family who has it. On the other hand, some of your relatives might have it and not be aware of their condition.
Not inherited always. Obstructive sleep apnea is not a whole inherited disease, many reason related to osa is acquired.
Multiple factors. Many people with osa are unaware that they have it. It does tend to run in families largely due to inherited characteristics of the upper airway but medications, weight, and personal anatomy are important risk factors.
Variable causation. OSA can be inherited, or not. It can relate to your lifestyle, medication, weight, airway anatomy. Best advice is to seek evaluation by a board certified sleep expert.

Related Questions

My sister says she has obstructive sleep apnea. Are family members more likely to get the same thing?

Yes. There is a strong link to obesity which has a genetic component, and there is also some increased risk to have the disease if relatively have it. Read more...
Yes. Studies are showing trends in families about sleep apnea, so your sister's diagnosis puts you at higher risk. There are lots of factors to consider, though. Genetics may play a role in muscle tone and structure of the airway. Read more...
Yes. Yes. A predisposing factor - obesity - has familial tendency. Also structural abnormalities which contribute (small jaw, nasal abnormalities) also familial. Read more...