A 41-year-old man has been rescued after surviving for hours in waters off Rottnest Island.