The aim of this study is to substantiate the use machine learning methods to optimize a combination of ultrasonic welding (USW) parameters for manufacturing of multilayer lap joints consisting of two outer PEEK layers, a middle prepreg of unidirectional carbon fibers (CFs), and two energy directors (EDs) between them. As a result, a mathematical problem associated with determining the optimal combination of technological parameters was formulated for the formation of USW joints possessing improved functional properties. In addition, a methodology was proposed to analyze the mechanical properties of USW joints based on neural network simulation (NNS). Experiments were performed, and threshold values of the optimality conditions for the USW parameters were chosen. Accordingly, NNS was carried out to determine the parameter ranges, showing that the developed optimality condition was insufficient and required correction, taking into account other significant structural characteristics of the formed USW joints. The NNS study enabled specification of an extra area of USW parameters that were not previously considered optimal when designing the experiment. The NNS-predicted USW mode (P = 1.5 atm, t = 800 ms, and τ = 1500 ms) ensured formation of a lap joint with the required mechanical and structural properties (σUTS = 80.5 MPa, ε = 4.2 mm, A = 273 N·m, and Δh = 0.30 mm).