Night trains have a nasty habit of being late. Not always, but not infrequently - and when they are late, they can be very late (an hour or more).
This is not just a Prague to Budapest train - by the time it gets to Budapest, it consists of four portions: from Berlin, Prague, Warsaw and Krakow, which are joined together at various points in the journey. It only needs one portion to be significantly delayed to affect the whole train - hence the risk of late arrival in Budapest is increased.
Under normal circumstances, you would have plenty of time to get to the airport, as you say. However, if this a flight you can't miss, I would be wary about it.