you cannot book trips from Poland to Czech Republic online.
However, it is no problem to just buy the ticket locally at a international ticket office at a station in Poland. If you are staying in Krakow (or Poland in general) a few days before you leave for Prague you can purchase special fare offers "SparDay" or "SparNight" at the stations.
It is no problem to wait until you are in Poland, trains wont be sold out (in fact, the night train could be sold out especially at weekends but you would still have several options available during the day).
PS: I deleted your other post, no need to post the same thing twice.