A linear stability analysis is carried out for the interaction of an erodible sediment bed with a sediment-laden, stratified flow above the bed, such as a turbidity or bottom current. The fluid motion is described by the full, two-dimensional Navier-Stokes equations in the Boussinesq approximation, while erosion is modelled as a diffusive flux of particles from the bed into the fluid. The stability analysis shows the existence of both Tollmien-Schlichting and internal wave modes in the stratified boundary layer. For the internal wave mode, the stratified boundary layer acts as a wave duct, whose height can be determined analytically from the Brunt-Väisäläf r e q u e n c y criterion. Consistent with this criterion, distinct unstable perturbation wavenumber regimes exist for the internal wave mode, which are associated with different numbers of pressure extrema in the wall-normal direction. For representative turbidity current parameters, the analysis predicts unstable wavelengths that are consistent with field observations. As a key condition for instability to occur, the base flow velocity boundary layer needs to be thinner than the corresponding concentration boundary layer. For most of the unstable wavenumber ranges, the phase relations between the sediment bed deformation and the associated wall shear stress and concentration perturbations are such that the sediment waves migrate in the upstream direction, which again is consistent with field observations.