In the fairy-tale send-up “Once Upon a Mattress,” Prince Dauntless the Drab finally meets the woman he’s been waiting his whole life for — Winnifred the Woebegone. There is a similar feeling of fate in the new Broadway revival of the bouncy 1959 comedy that opened Monday night at the Hudson Theatre. A show and a star have aligned.

Mary Rodgers’ musical has found Sutton Foster. Of course, Winnifred, uncouth and unwashed, is far from the picture of a princess. But it’s hard to imagine a more perfect fit for the role than Foster, whose 26-year stage résumé reads like a road map to “Mattress.

” In the raggedy royal, we can see shades of Janet “I don’t wanna show off!” Van de Graaff of “ The Drowsy Chaperone ,” accidental ogre Fiona of “ Shrek the Musical ” and even her turn in the recent “Sweeney Todd.” Mrs. Lovett probably has some critters nesting in her hair, too.

What a winningly funny mashup it is. The production, directed in haste by Lear deBessonet, is not without its flaws. Personally, I’m tired of lazily staged, barebones Encores! concerts being lugged to Broadway like a surprisingly nice couch somebody found on the curb.

Still, Foster is such a smash that you forgive most of the peripheral problems. Think of “Mattress” as the foremother of princess-behaving-badly stories; those mold-breaking damsels who cause distress with their unapologetic individuality. There would likely be no “ Bad Cinderella ” were it not for “Once .