Ismail Sabri tweeted he also met the ex-leader's wife and that he hopes "Mahathir's family continues to stay strong".
Mahathir was admitted about a fortnight after he had a procedure at the same facility, and he also spent several days there in December for a check-up.
He has had numerous heart problems over the years, suffering several heart attacks and undergoing bypass surgery.
Mahathir is one of Malaysia's most dominant political figures, having served twice as prime minister for a total of 24 years.
He was leader from 1981 to 2003, then returned to power in 2018 at the age of 92, heading a reformist coalition in the wake of the huge 1MDB corruption scandal.
But that administration collapsed in 2020 due to infighting.