Unfortunately for you it will be difficult to get couchette/sleeper reservation for train from Poland to Hungary via official railways websites, since first of all railways rarely sell just reservations via internet, plus in this particular case Polish Railways (PKP) doesn't even sell online tickets for connections to Poland, so definitely you can't buy reservations either. However, reservations for Krakow to Budapest carriages should be available not only in Poland/Hungary, but also at any ticket counter with access to EPA reservation system, thus a good chance that you can buy desired reservation even in UK via
DB agencies which specialize on selling European tickets (at least it won't hurt to try)
p.s. when do you plan to travel? Since if it's not peak period, then maybe it doesn't really worth a hassle to "hunt" for reservation before actual arrival to Poland. Couchettes in Warsaw/Krakow-Budapest carriages aren't as popular as sleepers, so there is good chances that it will be available even before departure