Enhancing the viscoelastic characteristics of hydrogel systems through strategic colloidal particle interactions is paramount for their functionality in rectal gel applications. This investigation delves into the synergistic interactions between cationic nanoparticles (CNPs), anionic nanoparticles (ANPs), and composite nanoparticles (NPs) within a hyaluronic acid (HA) hydrogel matrix, employing response surface methodology (RSM) for optimisation. Critical parameters, namely the volume fraction of NPs and oscillatory amplitude, were meticulously calibrated to achieve optimal complex viscosity, as determined by advanced rheometric analysis. The findings reveal substantial effects of CNPs, ANPs, and mixed NPs on the viscoelasticity of the HA hydrogel, with complex viscosity measurements of 490.82 +/- 10.57, 214.70 +/- 8.96, and 328.46 +/- 6.67 mPa.s, respectively. The hydrogel system with mixed NPs exhibited a strong concordance with empirical data (R2 = 0.9843), validating the predictive precision of the model. Morphological assessments uncovered a highly interconnected network within the HA gel-particle composite, characterised by both densely and sparsely packed porous architectures. This study presents a robust framework for modulating viscoelastic properties in colloidal particle-gel systems, providing pivotal insights for the development of advanced rectal gel formulations.