Ionogels have the advantages of thermal stability, non-volatility, ionic conductivity and environmental friendliness, and they can be used in the field of flexible electronics and soft robotics. However, their poor mechanical strength and complex preparation methods limit their practical application. Herein, we propose a simple strategy to improve the performance of ionogels by adjusting their phase separation behavior. In a polymer-ionic liquid (IL) binary system with an upper critical solution temperature (UCST) and Berghmans' point, the phase separation behavior will be frozen below the temperature corresponding to the Berghmans' point, and thus, the degree of phase separation can be adjusted by controlling the cooling rate. We found that a polyacrylamide (PAM)-IL binary system possessed a UCST and Berghmans' point and the resulting ionogels had excellent mechanical properties. Their tensile strength, tensile modulus, compressive strength and compressive modulus reached 31.1 MPa, 319.8 MPa, 122 MPa and 1.7 GPa, respectively, while these properties of the other ionogels were generally less than 10 MPa. Furthermore, they were highly transparent, stretchable, stable and multifunctional.