The Muse Ultra deep field (MUDF). II. Survey design and the gaseous properties of galaxy groups at 0.5 < z < 1.5