We Present a new architecture of the 3D SAG wireless access networks for uplink communication between IoRT and LEO satellite, utilizing several multi-antenna UAV relays. The most important structural features of this network are as follows: 1) Due to the prominence of multi-antenna systems technology as a promising solution to achieve advanced telecommunication systems, multi-antenna UAV relays are considered in our system model. These relays have the capability to communicate with each other using singular value decomposition (SVD) beamforming technique. 2) To control the number of remote connections, only selected UAVs act as gateways to connect to the satellite. 3) The proposed architecture incorporates FSO space communication links to address limitations of the RF spectrum resource and achieve higher data rates for air-space links. We formulate a new joint optimization problem of gateway selection, channel allocation, UAV deployment, and UAV power allocation for multi-tier communication in order to minimize the weighted sum of the number of gateways and the total UAV power consumption. Our proposed solution includes a two-step approach using constrained k-means clustering for channel allocation between IoRT devices and UAVs, and UAV location, and an algorithm inspired by simulated annealing (SA) for gateway selection, channel allocation between UAVs and gateways, and UAV transmit power optimization. The UAV power optimization is solved using the successive convex approximation (SCA) method. Various simulations are performed to evaluate the performance of the proposed system model and the proposed optimization schemes. The results demonstrate the effectiveness of our proposed scheme in achieving optimal clustering, UAV deployment, and gateway selection. The required number of gateways for different scenarios is also determined. Notably, by implementing the SA algorithm to jointly optimize UAV transmit power, gateway selection, and UAV to gateway channel allocation, our proposed scheme achieves an average performance improvement of 48% compared to the case where only clustering is performed. The results also highlight the impact of the number of UAVs and the number of their antennas on the system performance.