I'm planning to fly through Istanbul with Turkish airlines and would have a 22-hour layover there. Would it be possible to exit the airport without retrieving my luggage? Do I have to specifically mention that I will leave the airport to the airline employees?
Since Turkish Airlines offers free tours of Istanbul to passengers with layovers like yours, you're going to want to tell them. You might prefer a free stay in a hotel instead, but I would go for the tour. The FAQ does mention:
There is luggage custody office next to Hotel Desk with a service fee. You may check the conditions and prices; http://www.ataturkairport.com/en-EN/airportguide/Pages/BaggageCustodyServices.aspx .If requested, touristanbul participants can leave their luggages (unless they are electronics or precious items) to the assigned tour shuttles at their own risk.
It sounds like everyone can use the Baggage Custody Services, and in addition if you don't want to pay for that, you can bring your baggage on the tour and leave it on the shuttle bus. But talk to the airline, because you may just be able to check it right through and not worry about it.
I'm not sure about Turkish Airlines but my wife had a 23hr stop in Dubai with Emirates and they offered to keep her checked luggages because it was < 24 hours. Airlines rules might differ.
If they do offer to keep your luggages then you'd be totally fine since airlines have no way of checking whether you are intending to stay in the airport or leaving the airport to do your business in the city in advance.