In the language of dogs, the yawn is often used as a calming signal. It's a way of saying, I've had enough and my patience is running out. For example, in a training session, your dog may yawn to deal with frustration and to give himself a mental break. The next time your dog yawns while you're training him, try showing him you got the message by reducing your intensity or changing your approach.
A yawn may indicate anticipation or stress, too. Your dog may yawn repeatedly when he's waiting in the vet's office as a way of dealing with nervousness. Sometimes dogs yawn in anticipation of something enjoyable, such as a walk—this is a way of controlling his enthusiasm.
Of course, there are times when a yawn is, well, just a yawn. The best way to understand the real meaning of the gesture is to look at the situation. If he yawns while stretched out comfortably on his bed, he’s probably just tired. If you're training or playing with your dog and he yawns, he may be asking for a little break.