dnd 5e – Can Tidal Wave be cast in midair?

Sure.

The spell tidal wave says:

You conjure up a wave of water that crashes down on an area within range. The area can be up to 30 feet long, up to 10 feet wide, and up to 10 feet tall.

The spell makes no assumptions about being cast in the air, on the ground or even in the sea itself. The section of the rules on targets makes clear that targeted areas are 3d in nature and can be in the air.

The concern about fall damage is not the fault of the spell, it was the choice of the DM to use flying monsters. If you cast any other spell that knocks targets prone, it wouldn’t be question, right?

As for the line:

The water then spreads out across the ground in all directions, extinguishing unprotected flames in its area and within 30 feet of it, and then it vanishes.

The water will eventually reach the ground, and when it does it will vanish. Creatures under the targeted area will get rained on, but not suffer the effects the spell. I see this is just a mechanic to get rid of all the newly created water so that it doesn’t turn all the combat into aquatic combat after the spell.