Hi,
Question on how to get from Krakow to Budapest overnight was already discussed, so you might simply take a look here -
http://europetrainsguide.com/forum/index.php/topic,57.0.html,
http://europetrainsguide.com/forum/index.php/topic,61.0.html. We are glad to answer any additional question you might have after reading those posts.
About CityStar: Hungarian railways doesn't offer CityStar to Turkey, but only to Bulgaria, thus you can buy it only for Budapest-Romania-Bulgaria/Turkey border. Just to remind you, CityStar is a return ticket, it cost 113 euro for one passenger, 169.5 euro for two etc. It can be used for your route, but you will need to buy additional ticket Bulgaria/Turkey border-Istanbul (in this case it will be Svilengrad-Istanbul and will cost around 10 euro per person). But purchase of the CityStar only makes sense if there are two or more passengers traveling. If you are alone, then it is cheaper to buy point to point tickets.
If you decide to use CityStar ticket, then you will probably need to change the route to Budapest – Sighisoara - Suceava – Brasov – Sinaia – Bucharest - Veliko Turnovo – Sofia – side trip to Rila Monastry- Sofia - Plovdiv - Istanbul. It's needed because Plovdiv is located on the route from Sofia to Istanbul, so you would avoid doint Plovdiv-Sofia twice. In such case your ticket will be issued for the route Budapest – Sighisoara - Suceava – Brasov – Sinaia – Bucharest - Veliko Turnovo – Sofia - Plovdiv - Svilengrad.
Generally, if it is not peak season, it's not a problem to buy sleeper reservations Budapest-Sighisoara for the overnight train. Same with Sofia-Istanbul + this one, unfortunately, you can buy only in Bulgaria, while Budapest-Sighisoara you can buy at any ticket counter which has access to Hafas reservation system.