2 person sleeper compartment on a night train to Prague on the 12th august but the tickets (which would have been 118 euros) have sold out on the official hungarian train website (MAV)
Hmm... actually a bit weird that for Sunday August 11 (supposedly busier day) they are still available, but for Monday August 12 system doesn't want to show anything
I have found 2 one-way sleeper compartment tickets on czech-transport.com, but for 172 euro plus postage.
czech-transport.com is an agency, which just resells train tickets with own commission and has nothing to do with official rail companies
Do sleeper compartment tickets tend to sell out, or would it be possible to buy them from the station in budapest, a few days before travelling to Prague? Would they be much more expensive than buying them online?
Well, during summer those Budapest to Prague carriages usually tend to by pretty busy, so absolutely no guarantees that you would be able to buy reservations for double sleeper few days in advance while already in Budapest
Would they be much more expensive than buying them online?
Tickets you wanted to buy (59 euro per person) are discounted so-called SparNight tickets, which are sold in limited number per each departure, so chances to buy them in Budapest few days before departure are almost zero. When buying on the day of travel you'll have to pay at least 49 euro per person for the ticket + another 21 euro per person for sleeper reservation (double). However, as was mentioned above, there are good chances that all the double would be sold out
Nevertheless, there are few options which you might consider:
a) buy SparNight ticket for the same train, but till Dresden and simply get off in Prague. Sparnight tickets Budapest-Dresden for double sleeper are 10 euro more expensive (69 euro per person), but still available. The only inconvenience is that Budapest-Dresden-Berlin group of carriages arrives to Prague not at 6am, but at 4am. During summer it's not a big problem, but still you won't get enough sleep.
b) you can simply buy out 4 couchettes (thus whole compartment--> making it a sort of double compartment) in Budapest-Prague carriages with arrival at 6am. 4 Sparnight tickets (39 euro each) are still available for August 12 via MAV website
c) on some rare occasions MAV website has been known to "lie", so sometimes almost magically tickets that were already sold out suddenly appeared again. Chances aren't very high, but still you can wait a bit and time to time check your date via MAV website
d) lose some time (but save some money) by taking either evening or morning train instead of overnight one. For the daytime discounted SparDay tickets start from only 19 euro and usually much easier to get, while extra night in hostel/cheap hotel would cost you even less than difference between 69/59 euro & 19 euro for the day time train