She refused to leave the stage as the orchestra began playing her off.
"I'd like to thank all the Tony voters - many of whom I've actually dated," Midler joked. She called the role "the greatest professional experience of my life". Midler kept talking as the orchestra attempted wind her up and get her off stage as the show was running over.
"Shut that crap off!" Midler said.
When the music stopped, Midler continued, by saying: "I just want to say that 'revival' is an interesting word. It means something was near death and was brought back to life. Hello, Dolly! never really went away. It's in our DNA. It's optimism. It's democracy. It's colour. It's hilarity. This is a classic: come and see it. It's not just me. This thing has the ability to life your spirits in these terrible times."
Later on, Tony Awards host Kevin Spacey emerged in his character of Frank Underwood from House of Cards, with his co-star Robin Wright by his side.
He told the audience: "I want to get the hell out of here before Bette Midler thanks anyone else."
Evan Hansen star Ben Platt, who is just 23, won best lead actor in a musical. The unlikely crowd-pleaser about teen suicide took home a swag of awards including best musical and best supporting actor (Rachel Bay Jones).