The duo will both make cameos in season three, alongside fellow Scrubs alumni Sarah Chalke, Sam Lloyd and Ken Jenkins, reports TV Line.
> Sarah Chalke signs for 'Cougar Town' role
Details on Braff and Maschio's roles are being kept secret, but it will be an on-screen part for Braff, who previously provided a voice role in season two.
Braff admitted earlier this year that he missed the camaraderie on the set of Scrubs.
Cougar Town returns to ABC in midseason.
> Courteney Cox to direct episode of 'Cougar Town'