We propose a distributed random algorithm to search a three dimensional environment by a network of mobile sensors. The presented algorithm utilizes an optimal three dimensional grid pattern for the search. To minimize the time of search, each mobile sensor shares the search information with the other sensors passing within its communication range. At first, mobile sensors build a covering grid, then they randomly move to the vertices of the covering grid to do the search task. A mathematically rigorous proof of convergence with probability 1 of the proposed algorithm is given and the effectiveness of the proposed search algorithm is demonstrated by simulations.