The lasing properties of rhodamine 6G dissolved in poly(2-hydroxyethyl methacrylate) matrices with different amounts of ethylene glycol dimethacrylate as crosslinking monomer are investigated. Increasing the rigidity of the matrix by decreasing the polymer free volume results in significant increases of both lasing efficiency and photostability. There exists an optimum degree of crosslinking for which efficiency and photostability reach the highest values.