Carpal Tunnel Syndrome in systemic illnesses
Yes it's the deposition of connective tissue components such as glycosaminoglycans, hyaluronic acid, and mucopolysaccharides (myxedema) is the reason why the median nerve gets compressed within the tunnel. For example in mucopolysaccharidosis you also have CTS.
As for bilaterality, it can be seen in systemic cause of carpal tunnel syndrome such as pregnancy, diabetes, and thyroid diseases. Bilateral involvement is not very common (<40% of cases) and usually only the dominant hand affected because movements plays an important role in the pathogenesis.