It sounds like a neural defect caused by trauma to your brain. I do not want to say anything stupid, so I will look in to this for you. Great work getting off the drugs though. I am not a fan of olanzapine because of the side effects and I am surprised to hear you had a positive out come.
I checked the NCBI internet site and it seems there is a link to head injury for Yawning and on WEBMD a link to the drugs you were taking for tiredness, though the drugs do not seem like accurate causes from your explanation, what type of injury did you suffer to your head?
Here is a possibility for head trauma causing Yawning.
Two cases of brain stem stroke involving the upper pons and the ponto‐mesencephalic junction presented with transient excessive pathological yawning, associated with gait ataxia and in one subject with upper limb and facial hemiparesis. A causal relation is hypothesised between the brain stem lesion and pathological yawning, possibly related to denervation hypersensitivity of a putative brain stem yawn centre. Excessive yawning may herald brain stem ischaemia.Keywords: yawning, brain stem stroke.
It sounds complex though is probably explained with simpler words somewhere else, so you should look up the technical words on the internet.
A stroke occurs when blood supply to the brain is interrupted. The way a stroke affects the brain depends on which part of the brain suffers damage, and to what degree.
Sitting just above the spinal cord, the brain stem controls your breathing, heartbeat, and blood pressure. It also controls your speech, swallowing, hearing, and eye movements.
Impulses sent by other parts of the brain travel through the brain stem on their way to various body parts. We’re dependent on brain stem function for survival. A brain stem stroke threatens vital bodily functions, making it a life-threatening condition.
In your case it would have caused one of the non life threatening disorders or damage.
You could have been mistakenly diagnosed with mental disorders rather than another problem caused by this, though further tests are necessary. You do not sound mentally ill to me. Though I do not have all the information. I hope this gives you greater clarity.
I will research more tomorrow.
Take care, Robert.