What you'll need:
Spare plastic sprues
Now, trenches are muddy, so lay put down some Green Stuff along the base to make some slushy mud as well as provide and anchor for the sprues which will form the trench walls.
Now, grab those sprue bits you cut earlier and line them up along the side of the base you want the walls to be on. For this model I chose to make it look like he is running out a trench system, so the wall will only be on one side.
Time to add some sand. Add some plastic glue to the base, and now dunk the base in some fine to gravely sand. If you've ever been to the beach, you'll know that sand get everywhere, so be careful you don't get your model covered in the stuff.