They don't get thermals at night. But can fly at night over winds blowing from ridges.
As well as in the "mountain waves" which cause these lenticular clouds
See Lee wave Those are available day and night. And the wave winds go so high you can fly into the stratosphere.
The record flight using these is to 15,453 metres, nearly twice the height of Everest - the pilots wore spacesuits to set the record. Perlan height record in Argentina - and during the flight they spotted a commercial airliner crusing below them at an altitude of 10,668 metres.
"I couldn't understand how the Chilean controller described us in Spanish to the airline pilot," he said in the statement. "But I understood the answer by the pilot: 'Wow.''' Perlan height record in Argentina
And also using the mountain waves, another pilot Klaus Ohlmann flew the distance record of over 3,000 km in a glider in S. America. Fai Record File
Most pages say that the world duration record for a glider is 56 hours 15 minutes in this plane, an Arsenal Air 100, by Charles Atger, April 2–4, 1952 at Romanin les Alpilles near Saint-Rémy-de-Provence, France
You can probably stay up in the air endlessly using these ridge winds, but they stopped doing these record flights after Bertrand Dauvin (aged 21 at the time), same one that helped set the tandem record, died in 1954 trying to break the solo record probably as a result of falling asleep at his controls. Gliding Record Attempt Fatal