While there isn't a definite answer to the yawning question I can throw you a few possibilities. Sometimes if the snake has an RI (Respiratory Infection) they will do that to breathe properly. The yawning would also come with wheezing, and fluid coming from the snakes nostrils; but I doubt it's that. More than likely the snake is just yawning to get a better smell of his environment. They smell by taking particles from the air (usually with their tongue) and placing them in the jacobsens organ located in the roof of their mouth. They can also do this by yawning so thats probably what your seeing him do. And they also yawn to re-aligne their jaw.