Hmm, one of the intercity trains pulled into Bridgend about 00:50 (I can see the station from my window). I thought it was odd because the last train you can get back from Cardiff on a Saturday is usually around 22:30.
I looked at the arrivals board on nationalrail.co.uk, and it was a train from Paddington. I looked at the details and it stopped at Newport, and then Bridgend.