As previously mentioned, they like to walk, especially when they're not happy (typically due to water parameters, especially if flow and lighting are properly dialed in).
One way to mitigate the walking is to provide it with a flat rock. Unlike other anemones that like to hide their foot in rockwork or bury it in sand, mags like to spread out their foot (I describe it as looking like a fried egg). This rock should also be positioned far enough way from the walls of the tank, so that when the mag is on top, none of its tentacles can "feel" the walls. If it can feel the flat surface it'll want to move.