Here is my deal with night trains. Its a personal preference. I haven't been on one since the early 1980s and at my age now, probably never will again. Imagine this:
7 am shower
noon check out of hotel and hope the desk will hold your bags until train time (most will)
9 pm arrive train station
11 pm finally get to sleep. Geee, what is that on the sheet? Never mind, go to sleep.
8 am arrive where ever you are going. Dang i'm hungry.
Eat and drop bags with the front desk or vise versa.
8 am to 2pm wander around stinking
2 pm check into new hotel and shower
30+ hours between showers in an environment with little or no air conditioning exceeds my personal limits. Even in September / October.
But some swear by it. So its all personal taste.
I go to Budapest often and Slovakia on occasion and while I have been with 100km or so of Krakow I haven't been all the way yet. There are aspects of Krakow that hit too close to home and I have chosen to avoid for now. Maybe someday. BUT, as for the sightseeing you are missing, the landscape from Krakow to Budapest and the towns and villages between Krakow and Budapest are very much worth seeing. I love Slovakia.
There are a couple of bus companies running the route from Prague to Krakow and from Krakow to Budapest and several private transfer companies. The private transfer would be someplace in the neighborhood of $500 and take about 6 hours for each leg; while I think your train tickets are going to cost a little over $300 for the two of you. If you can afford the additional cost hire a guide service and do some sight seeing in Slovakia on the way. Beautiful country.
The "you cant get here from there" problem with Krakow is another reason I haven't been there. When people ask about the region I generally suggest an easier trip. Something like:
Prague
Cesky Krumlov
Vienna (or Sopron if you have already seen Vienna)
Gyor
Budapest
All cheap and easy transfers by train and shuttle.
If you go to Krakow and have the resources and time I suggest a night south of Krakow at the Kempinski High Tatras Hotel then a private guide to take you to a castle or two, then one or two of the Banska towns then on to Budapest.
So many options, so little time, so little $$$$$$$$$$$$$ Always my problem.
But you did pick he absolute best time of year for the region. Have a blast and let me know if I can assist wiith Budapest (my hobby)