Does your horse have a salt or mineral block nearby? If not, try putting one out and see if that helps reduce the habit. Generally horses that eat manure are horses that are starved or neglected. Has your horse had a past like that? Also, if your horse has been on antibiotics lately, his body could be trying to regulate the microbial content in his gut, since antibiotics kill some of the bacteria that helps him digest food and absorb nutrients.
In general, if a mineral block and salt doesn't fix the problem, there isn't a lot of other things you can do. As far as I know, the habit is harmless.
"Always be yourself. Unless you can be a unicorn. Then, always be a unicorn."