The synthesis of a series of photo cross-linkable terpolymers of poly(N-isopropylacrylamide) (PNIPAAm) with N,N-dimethylacrylamide (DMAAm) as a hydrophilic and 2-(Dimethylmaleimido)-N-ethylacrylamide (DMIAAm) as a chromophore is described for tailor-made swelling behavior of thin hydrogel layers. The polymers were spin coated on gold surface and swelling behavior thin hydrogel layers were investigated by the combination of Surface Plasmon Resonance and Optical Waveguide spectroscopy (SPR/OWS). It was observed that an increase in the hydrophilic monomer (DMAAm) content increases both transition temperature (T c) and swelling of the hydrogel layers. In addition the collapsed hydrogel thickness was also dependent on the DMAAm mol-Adhesion promoter synthesized for the covalent attachment of hydrogel to substrate has been further investigated to optimize dynamics of adsorption and adhesion on the gold surface. UV illumination (>310 nm) results in simultaneous crosslinking and chemical attachment of the hydrogel to the surface. Covalent attachment confines the swelling and deswelling in one dimension i.e. perpendicular to the substrate.