Spanish midfielder Mata, 33, has put pen to paper on a one-year extension that will keep him at United until next summer.
The popular former Chelsea playmaker had been expected to stay despite making only 18 appearances across all competitions under Ole Gunnar Solskjaer last season, just nine in the Premier League.
Shortly after confirmation of Mata’s new deal, United also announced the arrival of Heaton on a two-year contract.
The 35-year-old was a free agent after being released by Aston Villa at the end of the 2020/21 campaign and returns to Old Trafford after 11 years away.
Heaton initially joined United as a youngster and stayed for 13 years, but did not make a single senior appearance as he was loaned out on six separate occasions before rejecting the offer of a new deal to join Cardiff on a permanent transfer in 2010.
He has since also played for the likes of Bristol City and Burnley, while earning three senior England caps.
Heaton will now provide cover for Dean Henderson and David de Gea, with Sergio Romero having left the club.
“For me to have the opportunity to come back after spending 13 great years here as a kid, it’s an incredible feeling and I’m really, really excited to get started,” Heaton told United’s official website.
“I’m just seeing it as a fantastic opportunity as I still feel I’ve got an awful lot to give and I’ve got the bit between my teeth.
“I’m looking forward to hitting the ground running. I feel in great shape and I’m looking forward to coming in to compete with the other goalkeepers.”