  Elongated floaters drifting in propagating water waves slowly rotate towards
a preferential state of orientation. Short and heavy floaters tend to align
longitudinally, along the direction of wave propagation, whereas long and light
floaters align transversely, parallel to the wave crests and troughs. We
investigate this phenomenon for homogeneous parallelepiped floaters by
combining laboratory experiments with numerical simulations and asymptotic
theory. For floaters small with respect to wavelength and for low amplitude
waves, we show that the floater orientation is controlled by the
non-dimensional number $F = k L_x^2 / \beta L_z$, with $k$ is the wavenumber,
$\beta$ the floater-to-water density ratio, and $L_x$ and $L_z$ the floater
length and thickness. Theory places the longitudinal-transverse transition at
the critical value $F_c = 60$, in fair agreement with the experiments. Using a
simplified physical model, we elucidate the physical origin of the preferential
orientation. Through its motion, the floater probes the velocity gradients
along its surface. Next to a small mean displacement (Stokes drift), this
results in a net torque which, for short floaters, always favors the
longitudinal orientation. This net torque arises from a phase correlation
between the instantaneous buoyancy torque and the instantaneous yaw angle of
the floater, a mechanism analogous to the Kapitza pendulum. The transverse
equilibrium of longer floaters has a different origin and arises from the
variation of the submersion depth along their long axis. This varying
submersion significantly increases the torque in the trough positions, when the
tips are more submersed, and always pushes towards the transverse orientation.
