Underwater networks suffer from energy efficiency challenges due to difficulties in recharging underwater nodes. In addition, underwater acoustic networks show unique transmission characteristics such as frequency-dependent attenuation, which causes the transmission power to significantly depend on the bandwidth and the distance. We here investigate the cross-layer energy minimization problem in underwater ALOHA networks considering the unique transmission properties of the underwater medium. We first analyze the separate optimization of the physical (PHY) and multiple access control (MAC) layers to minimize energy consumption. We analytically obtain the energy-optimum channel access rate for the ALOHA MAC layer, which minimizes the energy consumption per successfully transmitted bit. We then formulate a cross-layer optimization problem, which jointly optimizes PHY and MAC layers to minimize energy consumption. We show that such cross-layer optimization reduces the energy consumption per bit as much as 66% in comparison with separate optimization of both layers. Cross-layer optimization achieves this energy efficiency by assigning higher MAC-layer resources to the nodes that have a longer distance to the base station, i.e., which experience a less efficient PHY layer. Moreover, cross-layer optimization significantly increases the amount data transferred until first node failure since it results in a more homogeneous energy consumption distribution among the nodes.