Yes, pilots sleep during the flight, and it is important that they do.