Dogs will often do this just to get your attention. It can also be a way in which your dog shows affection and is just trying to show you some love. If they keep doing this, then you should give them some attention by patting them, playing with them, or even take them out on a walk.