The integration of cognitive radio networks (CRNs) and unmanned aerial vehicles (UAVs)-assisted communications has become an effective approach to addressing the challenges of spectrum scarcity, difficulties in equipment setup, and high communication costs in maritime communications. For sake of security and energy consumption issues of UAV-assisted communications, we propose a maritime dual-UAV-assisted cognitive relay communication system in the presence of an unknown-position eavesdropper (Eve). Considering the large-scale time-varying channels of the Marine network and the presence of Eve, one of the UAVs is used to relay information and the other one is used to interfere with Eve. Meanwhile, an error estimation model is employed to approximately estimate the position of Eve. Energy harvesting (EH) under time segmentation (TS) is applied by UAVs with periodic elliptic trajectories to compensate their transmit power for maximizing security energy efficiency (SEE) of the proposed system. Due to complex non-convex constraints and fractional form of objective function of the proposed optimization problem, it is challenging to solve using conventional methods. The Dinkelbach algorithm for fractional transformation and the Lagrangian dual method are introduced to overcome the aforementioned difficulties in solving the problem. Simulations verify the effectiveness of the proposed algorithm in improving SEE.