Localization is a fundamental task for optical internet of underwater things (O-IoUT) to enable various applications such as data tagging, routing, navigation, and maintaining link connectivity. The accuracy of the localization techniques for O-IoUT greatly relies on the location of the anchors. Therefore, recently localization techniques for O-IoUT which optimize the anchor's location are proposed. However, optimization of anchors location for all the smart objects in the network is not a useful solution. Indeed, in a network of densely populated smart objects, the data collected by some sensors are more valuable than the data collected from other sensors. Therefore, in this paper, we propose a three-dimensional accurate localization technique by optimizing the anchor's location for a set of smart objects. Spectral graph partitioning is used to select the set of valuable sensors. Numerical results show that the proposed technique of optimizing anchor's location for a set of selected sensors provides a better location accuracy.