Most loads have reached peak velocity at 10-14 inches. That said, anything longer is just a place for it to pick up inaccuracy from the rifling. In reading about suppressed 22s, they are usually 5.5 to 10 inches, with eight being a common length. They are short and thick, so they have low amplitude barrel harmonics. But you are probably not going to be able to go that route, so I would say just a 16 inch with a good muzzle crown. Most 22 as called on to be accurate so you don't want anything hiding the crown. But then again, the crown is less important with a 22 rimfire than with something with more pep. Lower gas pressure at the muzzle to play with the base of the bullet if the crown isn't even.
As for longer than 16 decreasing accuracy, maybe, but I don't think it would be noticable to most people, and it would be such a small factor that others would make much more difference. I have a remington bolt gun with a 24 inch barrel that shoots extremely well for what it is. Non-free floated barrel, action held in by only one screw, you can really see the slop with the bolt is closed empty.