If you time your travels right, it often makes more sense to compare prices of sleeper trains to the price of a flight + one night at a hotel instead of the flight alone. Also trains often get you to city centres while most low cost airlines will take you to an off-center airport which is also worth something.