I've suffered from the same problem a few times before. I usually just brush out the tail the best I can. (Sometimes a typical mane/tail brush isn't enough, you might have to use a stiffer body brush and/or your fingers to pick some pieces out.) Usually, this is enough and does the trick for me. However, if this method still isn't satisfactory, you can use a leave in shampoo spray to help loosen the rest of the mud.
The first thing to do is to brush him to remove as much mud as possible.
Then if there is still mud on him, you can use a dry shampoo. I use the Veredus dry shampoo on my grey horse an dI love it. It really removes the stains (urine, grass, mud, ...) I bought it on @horsediscount and don't regret.