Hi Zero Xenith,
First of all sorry about delayed reply from us, sometimes we also travel and during such travel not always we have a chance to access internet in order to answer questions right away, we apologize
Regarding your itinerary, then just let's have a look at each leg and see what we end up with:
Krakow to Bratislava: for a full fare ticket you'll pay roughly 60 euro per person + another 9,4 euro (6 berth couchette) or 14 euro (3 bed sleeper). And yes, on route from Krakow to Bratislava/Budapest Polish Railways (PKP) offer special discounted SparNight offer (ticket+reservation for 6 berth couchette is 39 euro, for 4 berth - 43 euro and for 3 bed sleeper is 45 euro). However, as you already noticed yourself, PKP doesn't sell such tickets online via their website (although promised to do so long time ago, so shame on PKP). Now the only chance to buy SparNight tickets is either buy it directly via PKP ticket counter in Poland or use an agency, which obviously will charge some commission, but at the end the sum will be cheaper than full fare price mentioned above. Also if you not particularly in to a night train, ready for train changes/some ticket tricks or just can substitute train by bus, then obviously it won't be a problem to travel from Krakow to Bratislava much cheaper than 60 euro + sleeper reservation fare (9,4-14 euro)
Bratislava to Budapest: here everything is easy, relatively cheap and totally doesn't require any booking in advance, since you can just show up at the station and buy you ticket, will be 17,5 euro per person
Budapest to Belgrade: same as above, no need to book anything in advance (however you can do that), since one-way ticket bought in Budapest at the Hungarian Railways (MAV) ticket counter will cost you just 15 euro (or 23 euro with reservation in 6 berth couchette, 25 in 4 berth couchette or 27 euro for the ticket+ 3 bed sleeper reservation)
Belgrade to Sofia: again it doesn't really make sense to book anything in advance (and anyway it's not possible with Serbian Railways and such trip), so buy the ticket (roughly 20 euro) and reservation (6 euro for 6 berth couchette or 10 euro for 3 bed sleeper) already in Belgrade
Sofia to Istanbul: if you don't want to have a hassle with train to bus change at night, then obviously direct bus is your choice. Buses are numerous, run often and cost just like 50 BGN (app. 25 euro)
As you can see, even with all the tickets bought at the stations before departures you will end up spending (just tickets) roughly 140 euro per person for the whole trip Krakow-Bratislava-Budapest-Belgrade-Sofia-Istanbul or plus extra 15 to 25 euro with sleeper reservations for two overnight journeys
We're also slightly worried about trains selling out - is this likely to be an issue?
Well, tickets won't sold out, however some problems might await you with sleeper reservations, especially since it's kind of high-season. So there is a chance to expect that 3 or 2 bed sleepers for Krakow-Bratislava-Budapest carriages can be sold out a few days in advance. However if such situation does happen, then you can always go with couchette or, as final measure, just travel in a seating carriage, at the end you hardly will be stuck in Krakow even if some reservations aren't available