Reconfigurable intelligent surfaces (RISs) are a transformative technology for improving wireless communication and localization accuracy. This paper focuses on optimizing RIS placement in the near-field (NF) scenario to minimize the position error bound (PEB) in single-input single-output (SISO) systems. Closed-form expressions for the fisher information matrix (FIM) and the PEB have been derived to evaluate localization performance. The analysis reveals that the RIS placement significantly affects localization accuracy. Two optimization methods are explored to identify the optimal RIS placement: an exhaustive search and a heuristic gray wolf optimizer (GWO). The exhaustive search method guarantees finding the optimal placement by evaluating all possible configurations discretely, but it is computationally intensive. The GWO method offers a more computationally efficient, continuous approach by imitating the behavior of gray wolves. Simulation results show that both methods effectively enhance localization accuracy, with the GWO method achieving superior performance in terms of computational efficiency and PEB minimization. The study highlights that strategic RIS placement can lead to substantial improvements in localization precision, making RIS a vital component for future wireless communication networks. This work provides a comprehensive framework for optimizing RIS deployment in NF communication scenarios, offering practical insights for enhancing localization accuracy in practical applications.