I normally like to base my models before undercoating, in this way I am gluing the base materials (ie sand or slate) to the raw base and not a partly painted base. Also the undercoat helps to cement the base materials. However not everything always goes to plan, sometimes I have a spraying session before I have a basing session.
This was certainly the case with my Inquisitorial Stormtroopers who were well painted before I started to base them. As I was doing a desert feel to these I knew I was going to use sand, but also wanted some rocks as well, so, I used some slate from the Warhammer 40K Urban Basing Kit.
Next stage will be adding some Games Workshop sand.
See the full workbench feature on my website.