The XYZ coordinate system is fixed to the instrument regardless of the orientation, and the Z coordinate points in the direction the beams are pointing, but perpendicular to the head of course. In the case of a standard head like AquaPro, the direction of the Z coordinate is then from the end-bell with the connector towards the sensor head.
The XYZ coordinates is right-handed coordinate system. More about this can be found in the Comprehensive Manual - ADCP.
If recorded in ENU coordinates, U is always up regardless of the ADCP orientation.