Poly(N,N-dimethylacrylamide) (PDMA) is a water-soluble and biocompatible polymer useful in biomedical, biotechnological and pharmaceutical application areas. In this study, dimethylacrylamide (DMA) units were connected with dimethacrylate chemical cross-linkers (DMA-xl) with various chain lengths to get homogeneous, biocompatible and mechanically strong DMA hydrogels and cryogels. In the first step, the effect of the distance between the vinyl groups of the cross-linker molecules on swelling and mechanical properties was investigated. While cross-linkers bearing longer ethylene glycol units from DMA-1 to DMA-2 bond more water molecules, DMA-9's equilibrium swelling values are the lowest, which may be due to the better movement capability of the chains with longer cross-linker units that will increase the physical interactions between the molecules and lead to the more compact structures. In the second step, cross-linker ratio was changed with a fixed dimethacrylate group. When the mol ratio of DMA-2 is decreasing step by step from the highest to lowest concentration for the gels after synthesis, the elastic modulus decreases gradually from 30 to 6 kPa, and the gels show similar mechanical behavior in the swollen state. In the last step, the amount of cross-link units on the morphology of cryogels was investigated with DMA-2 gels. The results explicitly indicated that while the mesh size of PDMA cryogels decreased with an increase in DMA-2 concentration, the mechanical stability of the gels was increased.