The interlayer sliding energy landscape of hexagonal boron nitride (h-BN) is investigated via a van der Waals corrected density functional theory approach. It is found that the main role of the van der Waals forces is to anchor the layers at a fixed distance, whereas the electrostatic forces dictate the optimal stacking mode and the interlayer sliding energy. A nearly free-sliding path is identified, along which band gap modulations of ∼0.6eV are obtained. We propose a simple geometric model that quantifies the registry matching between the layers and captures the essence of the corrugated h-BN interlayer energy landscape. The simplicity of this phenomenological model opens the way to the modeling of complex layered structures, such as carbon and boron nitride nanotubes.