I wash mine in the washing machine after each use, I don't use much detergent or softener. I find that gets rid of most of it. Occasionally I will have a pick at one if it gets bad, sometimes a stiff brush will get rid of some of it.
Only drawback is, sometimes the waste outlet from the machine gets a bit blocked and it doesn't drain very well. Every couple of months I unscrew the waste access on the front of the machine and suck out all the gunge with my portable and a crevice tool. I guess half of the crud is just the normal stuff that builds up through everyday use so it's a good bit of maintenance i suppose!
One thing worth remembering is that if you're getting your bonnet really badly caked in carpet fibres, you're causing a bit of damage to the carpet! Maybe running too dry or dwelling in one place too long.