On most long haul aircraft there are hidden beds where the pilots and Cabin Crew are able to sleep out of the view of passengers. Some long haul flights require there to be 3 or 4 pilots due to the length of the flight and to allow a suitable sleep/rest opportunity for the pilots.