You need to check online on the TA’s website or send en email to the proper TA stopover department who can help you get a transit hotel if you are eligible for it. If you are not eligible you can stay at Yotel inside the airport or in the town of Arnavutkoy which is near the airport (taxis, private shuttles, or metro options possible). I’m not allowed to post a link but you can google “Turkish airlines stopover” and it will come up as a first or second option.