Sharif and Zardari, who lead Pakistan's two biggest parties in the coalition government, emerged from negotiations in Dubai late on Thursday.
Both sides said they had made progress and that the coalition would survive, but did not announce a final agreement.
"With a little give-and-take they [the PPP and PML-N] have been able to set aside their differences," Kamal Hyder, Al Jazeera's correspondent in Islamabad, reported.
The PPP wants to link the restoration of judges to a proposed package of judicial reforms that could limit the powers of Iftikhar Mohammed Chaudhry, the chief justice of the supreme court, and prevent judges from getting involved in politics.
Zardari accused Chaudhry and other judges of "playing politics" and failing to deliver justice to him during the years he spent in jail on alleged corruption charges.
Musharraf removed Chaudhry when the supreme court was preparing to rule on the legality of his October election by the previous parliament to a new five-year presidential term.
Musharraf accused Chaudhry of corruption and conspiring against him and political plans.
Chaudhry is considered by many as an "independent-minded" judge, who has blocked numerous government privatisation deals and investigated complaints that the country's spy agencies were holding opposition activists secretly under the pretext of the so-called "war on terror".
The PML-Q, Pakistan's main pro-Musharraf party, has said it will work on its own proposal for restoring the judiciary and consider joining a new ruling coalition if the current one breaks up.