We analyze the relationship between codon usage bias and residue aggregation propensity in the genomes of four model organisms, Escherichia coli, yeast, fly, and mouse, as well as the archaeon Halobacterium species NRC-1. Using the Mantel-Haenszel procedure, we find that translationally optimal codons associate with aggregation-prone residues. Our results are qualitatively and quantitatively similar to those of an earlier study where we found an association between translationally optimal codons and buried residues. We also combine the aggregation-propensity data with solvent-accessibility data. Although the resulting data set is small, and hence statistical power low, results indicate that the association between optimal codons and aggregation-prone residues exists both at buried and at exposed sites. By comparing codon usage at different combinations of sites (exposed, aggregation-prone sites versus buried, non-aggregation-prone sites; buried, aggregation-prone sites versus exposed, non-aggregation-prone sites), we find that aggregation propensity and solvent accessibility seem to have independent effects of (on average) comparable magnitude on codon usage. Finally, in fly, we assess whether optimal codons associate with sites at which amino acid substitutions lead to an increase in aggregation propensity, and find only a very weak effect. These results suggest that optimal codons may be required to reduce the frequency of translation errors at aggregation-prone sites that coincide with certain functional sites, such as protein-protein interfaces. Alternatively, optimal codons may be required for rapid translation of aggregation-prone regions.