Belongings, inspired by items of luggage carried by railway passengers, was performed for the first time on Monday night.
It is the first time an opera has been staged on board a Caledonian Sleeper service.
The piece was performed in the lounge car of the train by cellist Zosia Jagodzinska and tenor Robert Lewis.
Music was by Samual Bordoli and libretto by Bankes-Jones.
The event came as part of a collaboration between soundfestival, based in the north-east of Scotland, and London's Tete a Tete: The Opera Festival.
Bill Bankes-Jones, director of Tete a Tete, said: "Our performances on the sleeper was designed to welcome audiences from two of the countries' most creative cities to sample new music and works."
Fiona Robertson, director of soundfestival, added: "We were delighted to be able to take this initiative forward with special performances on the sleeper.
"We hope hearing this opera will encourage people to come and enjoy more performances both at Tete a Tete and soundfestival."
There will be another chance to experience the opera on the sleeper overnight on 9-10 November.
The piece will also be performed as a pop-up work at King's Cross station throughout the Tete a Tete festival, which runs until 13 August, and in Deeside at soundfestival later in the year.
An opera has had its world premiere on a sleeper train between Aberdeen and London.