The indoor scene has the characteristics of complexity and Non-Line of Sight (NLOS). Therefore, in the application of cellular network positioning, the layout of the base station has a significant influence on the positioning accuracy. In three-dimensional indoor positioning, the layout of the base station only focuses on the network capacity and the quality of positioning signal. At present, the influence of the coverage and positioning accuracy has not been considered. Therefore, a network element layout optimization algorithm based on improved Adaptive Simulated Annealing and Genetic Algorithm (ASA-GA) is proposed in this paper. Firstly, a three-dimensional positioning signal coverage model and a base station layout model are established. Then, the ASA-GA algorithm is proposed for optimizing the base station layout scheme. Experimental results show that the proposed ASA-GA algorithm has a faster convergence speed, which is 16.7% higher than the AG-AC (Adaptive Genetic Combining Ant Colony) algorithm. It takes about 25 generations to achieve full coverage. At the same time, the proposed algorithm has better coverage capability. After optimization of the layout of the network element, the effective coverage rate is increased from 89.77 to 100% and the average location error decreased from 2.874 to 0.983 m, which is about 16% lower than the AG-AC algorithm and 22% lower than the AGA (Adaptive Genetic Algorithm) algorithm.