At least in the Senate it´s easier given the majority leader is not the chair, that would be the president pro tempore or the vice president. But in general, how does this happen if push comes to shove?
Also, if it is relevant, the kind of motion can be anything, to pass a bill, confirm a nominee, to make a normal resolution, to dethrone the speakership (or hypothetically to choose a new president pro tempore), etc, whichever one you know best.