The challenging terrain and deep ravines characteristic of mountainous regions often result in slower path planning and suboptimal flight paths for Unmanned Aerial Vehicles (UAVs) when traditional meta-heuristic optimization algorithms are employed. This study investigates the application of an Improved Enhanced Snake Optimizer (IESO) for three-dimensional path planning in a simulated rugged mountainous terrain. The initialization process in the enhanced snake optimizer is refined by integrating the Chebyshev chaotic map. Additionally, a non-monotonic factor is introduced to modulate the "temperature," and a boundary condition is incorporated into the dynamic opposition learning mechanism. These modifications collectively reduce the likelihood of population convergence to local optima during optimization. The feasibility of IESO is validated through time complexity and global convergence analyses. Comparative simulation experiments benchmarked IESO against five state-of-the-art optimization algorithms across test functions and path-planning simulated scenarios. The experimental results indicate that the enhanced algorithm achieves superior optimization precision, faster convergence speeds, and improved quality in the planned trajectories by 30%.