Topologically it is possible, you can even do it without ever lifting your left foot off the ground.
Problems like these are easier to visualize when you can deformation retract 3D objects into 1D: pants/underwear can be retracted to figure-eight spaces, while your body can be retracted to a parabolic arc for your legs (with everything above your waist squished into a single point at the apex).
Since the arc is contractible, any such clothing you put on could be removed in any order (assuming they are not linked of course, in which case it would be hard to take one off independently from another).
For an example of a similar, but topologically nontrivial problem, consider this: You can’t go from wearing “pants over underwear” to “underwear over pants” without either taking a foot off the ground, or stretching a garment around your head or the entire earth.