Cats like to lie down on their backs and roll around. They only do this when they feel comfortable as displaying their belly is a sign of vulnerability.
Often when they do this they are stretching but equally, it may be an attempt to engage you in a game. Experts think that cats roll around like this when they want to play.
Photo by athree23/ Pixabay
That said, they might equally just be marking their territory by depositing their scent on your nice new rug.