Upvote:4
Yes, you will be eligible for a free hotel, and transportation to the hotel.
Turkish airlines offers this for all connections that are longer than 12 hours (for economy class, 9 hours for business class) where a shorter option is not available - which in this case it is not.
You can find details of this service on the Turkish Airlines website. When you arrive in Istanbul simply go to the Hotel Desk (which is in the land-side arrivals area) and they will book the hotel and provide transportation there.
As you've stated, you will need to obtain visa in order to make use of this service.