Yeah, they will dig all the time. Mine rearrange their tank almost weekly but usually it's the female that will dig the pit when it is spawning related.
I keep a couple large pots in the tank and they spawn in those but the female will dig the sand out from in front of the pot just as part of the ritual I guess.
The male just does it as a display, I think . Because he will grab a mouth full of sand and just swim around with it for a few seconds and then blow it out in front of her as if to say "look how much I can move, Don't you want to make babies with me!" lol