In the end, it was Peeves—the least welcome person around—who happened to pass by and finally made Professor Flitwick stop his ultimate spell.
Otherwise, the helpless lot might really have had to wait until dinner before anyone found them.
As soon as Peeves saw Professor Flitwick and the students' predicament, learned what had happened, and heard Professor Flitwick's plea for help, he did exactly what you'd expect: he cackled wildly and flew through the walls in a certain direction at top speed.
And, unsurprisingly...
More than ten minutes later, Peeves finally returned, laughing so hard he was doubled over and rolling in midair, bringing Professor Dumbledore, Professor McGonagall, and a crowd of students who had no classes and had been drawn over by his gleeful laughter. They arrived at the somewhat secluded Charms classroom.
"Hee-hee-hee-hee—"
"Professor! Professor!"
"Come on, hurry!"
"Look!"
"There's something super fun in here, really!"
"This time, I promise it's not a prank, on the Bloody Baron's name!"
"At least, I'm not the one playing a prank!"
"Ta-da-da-daaa—"
"Look!"
"In here..."
"There's a whole bunch of people flying through the air!"
"And they can't get down!"
"Hee-hee-hee-hee-hee—"
Under Headmaster Dumbledore and the others' puzzled gazes, Peeves flung open the classroom door. As he revealed the scene inside to Dumbledore and the others, he once again burst into unrestrained laughter.
"Oh—"
"Merlin!"
Seeing what was happening in the classroom, Professor McGonagall was the first to cry out in shock.
"..."
"..."
"..."
Headmaster Dumbledore, Snape, and the others who had come with him merely walked into the classroom in silence, looking somewhat surprised. They soon stopped by the door, unwilling to venture farther in without caution, and began inspecting the room from where they stood.
"Ah!"
"W-what's going on?"
"No idea..."
"Did Peeves do this?"
"Impossible!"
"Peeves couldn't