The hotel Parco dei Principi is literally walking distance from the Bari airport --- I know because we walked it.
We've never been to the seaside town Giovinazzo just northwest of Bari, but it's a 15 minutes drive from the airport and is very much on our radar as a place to stay next time we go to Puglia. I don't know how jet-lagged and/or exhausted you'll be, or how confident you are about driving in Italy, but if you know you'll be fine, that's an option.
Alberobello is actually cool to go see, despite what I and others said above. Across the road from the section popular with tourists is a nice viewpoint from which all the knick-knack shops blend into the scenery and the town looks amazing, and there are plenty of non-commercial-looking trulli over on that side and it's fun to walk there.
Do stay in a cave in Matera and inside the city walls in Lecce.