Matawalu’s three tries set Glasgow on their way as they took a more than useful lead at the top of Conference A thanks to this away win over the second-placed team.
This was an entertaining clash, despite being overshadowed by the Wales v Scotland game to follow over the weekend, meaning the clubs were missing 20 players each between injuries and international calls.
For Glasgow that meant a debut for USA international No 8 Tevita Tameilau, with Fosroc Scottish Rugby Academy centre Stafford McDowall making his first start.
Glasgow notched an early penalty through Brandon Thomson, but conceded a try to Ospreys skipper Ollie Cracknell, the back-rower crashing over from short range after good work by the backs.
Glasgow full-back Ruaridh Jackson was injured in the opening exchanges so Matawalu came on to the field on the wing, Rory Hughes going to full-back.
Matawalu announced his presence with a rapid brace of tries, the first coming from a flip pass from wing DTH van der Merwe and the second from a searing break from his own 22 by centre Nick Grigg.
The rest of the first half was entertaining, but only a Sam Davies penalty for the Ospreys to show for it as Glasgow took a 17-10 lead into half-time.
Davies narrowed that lead with another penalty, but then up popped Matawalu, below, again to complete his hat-trick. After trying the forward route close to the Ospreys line, Thomson went for the cross kick which bounced kindly for Matawalu to add his third.
At 13-22 the Ospreys had a chance to attack, but fierce Glasgow defence pushed them back and back until eventually they cleared the danger in a passage of play every bit as vital as scoring a try.
It got better as a scrum move bringing Van der Merwe in from the wrong wing ended with man-of-the-match Grigg racing away for a try under the posts. The Ospreys narrowed the gap when a lucky bounce allowed wing Hanno Dirksen to race clear, but Glasgow held out for victory.