He's most likely doing this to get your attention, you can use this to your advantage by making him doing something he already knows such as sitting or lying down. When he does obey the command that's when you give him the attention he wants. This is what I did when my dog was a puppy and now whenever she wants something she will either lie down or sit pretty (sit with her 2 front paws up) and wait.

Paws In Art