According to wikipedia, the jury is still out on the function a yawn serves. The article referenced above however writes to say
Yawning most often occurs in adults immediately before and after sleep, during tedious activities and as a result of its infectious quality. It is commonly associated with tiredness, stress, overwork, lack of stimulation and boredom, though studies show it may be linked to the cooling of the brain
The first sentence there draws my attention. Given a yawn is almost definitely associated with sleep - being expected to occur immediately before, and after.
Does it follow that an insomniac does not yawn?
As a corollary, are there any known medical conditions which preclude the act of yawning? For instance, a comatose person probably does not yawn.