Others have campaigned for a Europe-wide effort to revive the Continent’s night trains as a more sustainable way to travel. Germany will raise its tax on flights to domestic and European Union destinations beginning in April, while the value-added tax on train tickets will be reduced in January. The Swedish government is exploring new nighttime connections to Continental Europe, and has pledged to provide funding for the project.

Among those traveling to Venice on a recent evening, many said their concerns about climate change had motivated them to choose the train for a weekend away. Travelers’ tickets were printed with information about the journey’s reduced carbon footprint compared with cars.

Noemi Trevisan, 22, of Padua, in Italy’s industrial north, was on her way home from Vienna.

“It’s an issue, and you want to do your part,” Ms. Trevisan said of climate change, settling into a tight compartment with four bunk beds unfolded. “In our region there are a lot of cars, a lot of pollution.”

ÖBB said it expected ridership on Nightjet to increase 10 percent by the end of this year, to 1.5 million passengers, a rise fueled by people who want to avoid flying.