Comment from an Airbus Pilot:
This is called controlled rest. This is done by reclining the seat and there are procedures in place to make sure everything is safe.
Imagine flying a 6 hour flight overnight without sleeping, that is much more dangerous, so this procedure was introduced. Normally pilot take turns napping, and they have a certain period of time after they wake up where they are not allowed to touch the controls.
@stux Packing away the yoke and switching to the Xbox controller :D
@Whiskeyomega @stux There's a sidestick on an Airbus. That's no yoke.
@stux I take it this plane is missing a crew compartment? https://www.youtube.com/watch?v=1venL93QmXA