From the Super Mario Wiki
Rolled-up carpets are objects appearing in Yoshi Topsy-Turvy. They are rolled-up when Yoshi first encounters them. When the player tilts the Game Boy Advance, the carpet unrolls, creating a platform. If the player tilts the Game Boy Advance in the opposite direction, the carpet rolls up again. If an enemy is walking on the carpet when it is rolls up, the enemy is defeated.