Night trains vary, and people's ability to sleep on night trains varies. I'd be concerned about being in condition to tackle the long drive from Prague to Krakow after a night on a train.
Are you planning to take the 6:30 PM NightJet from Amsterdam? That train makes 3 stops after midnight, at 12:22, 2:47 and 3:42 AM. Each stop is accompanied by braking, station noise and then acceleration. There is a change of trains at Regensburg (5:53 AM). Beyond that point, there are no beds. Total time on the train is nearly 16 hours, but how much sleep will you get?.
There's a 6:38 PM departure on a regular train (no beds) that connects to a EuroNight train in Frankfurt at 12:28 AM. That EuroNight train makes 7 stops on the way to Prague, at 5:01, 6:20, 6:59, 7:06, 7:35, 7:53 and 8:11 AM. Total train time is close to 15 hours.
I think it would be more practical to fly from Amsterdam to Krakow (there are nonstops on KLM and EasyJet, maybe others), see Auschwitz (and ideally some of lovely Krakow), then fly from Krakow to Prague (RyanAir serves that route, but not daily).
Alternatively, you could fly to Krakow and arrange a private transfer from there to Prague, using a company like DayTrip.com.