I've flown a couple of times with Turkish Airlines and, the last time I had a long layover at Istanbul airport I applied to a free tour with Touristanbul. When I was waiting for the tour start at the Hotel Desk, I saw a lot of groups of people that were taken to hotels and along the tour somebody told me that they had a long layover and Turkish paid for a hotel for them. I had no time to ask at the Hotel Desk. I'd like to know how to get this free hotel, if it really exists.
Yes you have the right to have free accommodation in some conditions. According to the Turkish airlines website:
Passengers have right to have free hotel accomodation only when there is more than 10 hours (7 or more hours for business class passengers) between two international connecting flights due to Turkish Airlines’ schedule structure for maximum 2 nights. Both of the connections must be with Turkish Airlines, reservations must be confirmed and transfer flight’s reservation must have done for the first scheduled flight. Hotels will be Turkish Airlines’ corporate hotels that will be provided though “Hotel Desk” office which was located at the arrival floor after customs. Passengers should have checked visa procedures in advance. In the event that they are not granted visas at the transit, Turkish Airlines assumes no responsibility for providing hotel services.