Lagrangian extensions of multi-dimensional integrable equations. I. The five-dimensional Martínez Alonso–Shabat equation