Turbulent stratified flow over topography is studied using layered quasi-geostrophic models. Mean flows develop under random forcing, with lower-layer mean stream-function positively correlated with topography. When friction is sufficiently small, upper-layer mean flow is weaker than, but otherwise resembles, lower-layer mean flow. When lower-layer friction is larger, upper-layer mean flow reverses and can exceed lower-layer mean flow in strength. The mean interface between layers is domed over topographic elevations. Eddy fluxes of potential vorticity and layer thickness act in the sense of driving the flow toward higher entropy. Such behaviour contradicts usual eddy parameterizations, to which modifications are suggested.