I went up to level 26 near the start of Stone's flying fortress, and almost got to 28 by the end (not counting the ant-dragon defences and headquarters). I got to 29 in Raze's Fortress, 30 at the start of Keara's fortress and 31 towards the top. Finishing most of largest rock in Kali's fortress got me to 32, and finishing most of the rest and clearing the dragon defences in Stone's fortress got me to level 33. Continuing to clear dragon defences and headquarters, including Broken Valley, I got to level 34 in Kali's fortress, finished with them all and turning in a couple quests got me to level 35. Finishing off loose ends and turning the remainder of the quests brought me to level 37, reaching 37 and a half at the end of the Hall of Echoes.

I left the dragon defences until last because structures give a fixed experience amount, so theoretically you could level a little higher if you do the ground opponents first, and leave the towers, etc, until later. Practically it didn't make a lot of difference, though.