First of all I keep 2 containers for my hair accessories, one for clean ones and one for used ones. I "never" mix the two.
Once a month I take my used ones and put them into a plastic container with a screw-on lid. It has to be large enough to allow for shaking and mixing well. I add just a few drops of shampoo, or cleaning solution, or dish or clothes soap. Then I add hot water and shake vigorously for a minute or two.
This page contains the following solutions.
Here is an easy way to keep your hair ties clean. Once a month or so place all of your hair ties, aka elastics and cloth headbands in a dirty sock. Tie the top of the sock into a knot and toss it in with the rest of your wash.