In arbitrary water depths, the influence of uniform flow, which includes transverse and longitudinal flows, on the generation of three-dimensional (3D) freak waves is examined. A modified Davey–Stewartson equation is derived using potential flow theory and the multiscale method. This equation describes the evolution of 3D freak wave amplitude under the influence of uniform flow. The relationship between two-dimensional (2D) modulational instability (MI) and the generation of 3D freak waves, as represented by the modified 3D Peregrine Breather solution, is explored. The characteristics of 2D MI depend on the orientation of the longitudinal and transverse perturbations. In shallow waters, the generation of freak waves by MI is challenging due to the minimal orientation difference, and longitudinal flows hardly affect the occurrence of MI. Variations in relative water depth can contribute to forming shallow-water freak waves. In finite-depth waters, oblique modulation leads to MI, whereas in deep and infinite-depth waters, longitudinal modulation gains significance. In environments of finite-depth, deep, and infinite-depth waters, the divergence (convergence) effect of longitudinal favorable (adverse) currents reduces (increases) the MI growth rate and suppresses (facilitates) freak wave generation.