The occurrence of unexpectedly large displacements in the interior of the oceans is studied through the dynamics of packets of internal waves, where the evolution is governed by the nonlinear Schrödinger equation. The case of constant buoyancy frequency permits analytical treatment. While modulation instability for surface waves only arises for sufficiently deep water, rogue internal waves may occur if the fluid depth is shallow. The dependence on the stratification parameter and choice of internal modes can be demonstrated explicitly. The spontaneous generation of rogue waves is tested by numerical simulations.