I usually grind mats whilst i'm watching a TV series or something on my Dual Monitors.
Only time I came close to a ban was a GM messaged me while I was paying attention to the show and when I responded he said "oh close " and I responded "close for what I was watching a movie."
He said I had been reported for botting and was checking up on me. This was back in TBC and was me running around circles in Un'goro mining thorium.
Never had a run in since and have done a LOT of grinding, sometimes up to 8 hrs straight if I've had a good show to watch.