Hey,
I suppose you won’t be only in Istanbul and immediately go to Budapest or?
This route can’t be reserved on Interrail website.
You can do it in the station in Istanbul (best to do in Halkali (on arrival) or if you are in the center, then in Sirkeci station. Sirkeci should work 8-20). If you are before in Bulgaria you can also buy the reservation there at an international ticket office.
The direct carriage Istanbul-Bucharest runs only until beginning of October. After that you have to change trains in Dimitrovgrad and Gorna Orjahovitsa.
The connection with departure at 17.45 is risky… last time I used it I had to run through Bucuresti Nord station and jump in the open door of the last carriage… So better to use the train at 22.00 to Budapest (with couchette). Then you’ve time for a dinner in Bucuresti.
Bucuresti-Budapest you can buy at the station (international ticket office) in Bucuresti. Seats are never sold out, couchette/sleeping car depends on day and time of year.