According to the man in seat 61 it is a direct train from Sofia to Istanbul so should only take one travel day. I assume you will not be moving compartments at these correspondences.
https://www.seat61.com/trains-and-routes/bucharest-and-sofia-to-istanbul-by-train.htm
As long as you can book a reservation that shows it as a direct train you will be able to add it to your pass as a single journey. Night trains often have stops where they change locomotives and/or crews and even shuffle coaches for varying destinations.
For clarity the travel day rules are that you can board as many trains as you like with a scheduled departure time between 0000 and 2359 on a travel day, including overnight trains. However if you transfer trains after 2359 then you need a new travel day for any onward trains.
Sofia-Istanbul is a direct train, so you only need 1 travel day. If the app doesn't show it as a direct train, and lets you change after midnight, then enter it manually.