There's nothing complicated about it. Just a quick flash of something that would give logical reason to why Captain Toad, who is defined by his lack of an ability to jump, is suddenly able to jump just like the sparkles on Ness' feet that hoist him up for his midair jump.
As for stupid, it isn't any more stupid than making Captain Toad naturally able to jump with the backpack on regardless of any justification ("the load's lighter", "who cares, Smash isn't canon", etc.).
Otherwise, the only reasonable solution is to go with Diddy's idea and just have him not have the backpack on while fighting.
Instead, have him pull it out to use for a Special or something.