A better option? Magnets.
I use a 10mm neodymium magnet because that's what I had lying around, but any decently strong magnet will do the job. The countersunk side sits nicely on the under-thread spooling guide on my current sewing machine. If there isn't anything metal in a convenient location, just glue the magnet wherever works best.
Now there is no more need to pause every few centimetres' worth of stitching to poke a pin back into a pin cushion. I just need to get it somewhere in the general vicinity of the magnet and it'll get pulled right in. Need to grab a pin? No more fumbling to hold a pin cushion down and pull a pin all with the same hand. The magnet is firmly stuck to my machine and isn't going anywhere, but a single pin comes loose easily.
Alternately, put a container on the magnet, with a few pins in it to hold it in place. This works great for projects with a lot of pins in it. Instant clean up. Just lift up the container and put it away, because all the pins are already in it.
Magnets. They're awesome.