From the Super Mario Wiki, the Mario encyclopedia
Gravity switches are objects found in Super Paper Mario. They are only found in the Whoa Zone. These switches can either invert gravity vertically (180 degrees) or rotate the direction of gravity (90 degrees). These switches are required for successful navigation of the Whoa Zone.