Results are presented from direct numerical simulations of the Boussinesq equations up to 1024^3 grid points in the presence of rotation (f = 2Ω) and/or stratification (N). The transfer of energy from three-dimensional to two-dimensional modes is found to be most efficient in the range 1/2 ≤ N/f ≤ 2, in which resonances disappear. In this range, the inverse energy cascade is faster than in the purely rotating case, and thus the interplay between rotation and stratification helps creating large-scale structures. The purely stratified case is characterized instead by an early-time, highly anisotropic transfer to large scales with almost zero net isotropic energy flux. This is consistent with previous studies that observed the development of vertically sheared horizontal winds, although only at substantially later times. However, and unlike previous works, when sufficient scale separation is allowed between the forcing scale and the domain size, the total energy displays a perpendicular (horizontal) spectrum with power law behaviour compatible with k⊥ ~ - 5/3, including in the absence of rotation.