This paper proposes an optimization algorithm to determine the optimal coherent combination candidates of distributed local beams in a wireless sensor network. The beams are generated from analog uniform linear arrays of nodes and headed toward the random directions due to the irregular surface where the nodes are mounted. Our algorithm is based on one of the meta-heuristic schemes (i.e., the single-objective simulated annealing) and designed to solve the objective of minimizing the average interference-to-noise ratio (INR) under the millimeter wave channel, which leads to the reduction of sidelobes. The simulation results show that synthesizing the beams on the given system can form a deterministic mainlobe with considerable and unpredictable sidelobes in undesired directions, and the proposed algorithm can decrease the average INR (i.e., the average improvement of 12.2 dB and 3.1 dB are observed in the directions of pi/6 and 2 pi/3, respectively) significantly without the severe loss of signal-to-noise ratio (SNR) in the desired direction.