What happens when I yawn but can’t sleep?

Yawning is generally a sign of lack of sleep, but frequent yawning that prevents sleep cannot be ruled out as a pathological factor.
Avoiding spicy and stimulating foods, having a regular routine, getting enough sleep, and going to bed early are also key to treating this condition.