Obstructive Sleep Apnea is unlikely to cause hallucinations, but
and they can occur with certain medications, stress,
sleep deprivation, in certain brain disorders
and with schizophrenia or bipolar disorders. So, like you mentioned sleep deprivation can cause hallucinations. But if they persist, I would advise you to discuss your symptoms with your primary care physician for further evaluation.
Hope this helped and do keep us posted.