Mega gyarados in sand teams?
I was thinking use it with Z giga impact Excadrill, as it can set up in things that annoy exca like celesteela, skarmory and ew locked Landorus-Therian, and improve the exca stall matchup with mold breaker taunt, and check a ash ninja in a pinch
Or the use of the gyara is more stricted to HO?
No one's saying you shouldn't try, but generally there are more popular choices for Sand setup sweepers. For instance, Mega Tyranitar can set up sand, Rocks, lure threats like Skarm or Lando by running special moves, or set up with DD. Normal Tyranitar can also break Exca cheks by hitting Crunch or Stone Edge an appropriate number of times while also checking SpDef powerhouses like Chansey. Mega Garchomp is a super popular sand option to pair with these mons because it has no trouble running Fire/Dragon special coverage with EQ and SE to drill through a huge portion of the meta.
M-Gyarados is cool because it can run Taunt to beat some enemies and doesn't get run over by Ash-Gren, but its need for hazard support, lack of passive healing, and need for a couple of setup turns can be disappointing unless it has good matchup and a great chance to set up. It also faces moveset issues: It obviously wants 2 Stabs but needs EQ to guarantee a +1 OHKO against Rotom-W. Without Crunch it can't beat Lati@s, Tangrowth, or Slowbro, without Waterfall it can't break Lando or use that 20% flinch to beat random shit like Zapdos. And of course, without Sub/Taunt it's susceptible to status. On sand in particular, it can run into problems with Tapu Bulu, who will weaken Exca's EQs, check Tyranitar/Hippowdon, and help teammates like Heatran by providing them with extra healing or, more worrilying for Gyara, a boosted Z-Grass attack.
I say give it a try even if it's unconventional - you've just got to build your team to be able to handle the mons that Exca and Gyarados need to beat in order to pull off a sweep.