In this paper, we consider a collaborative sensing scenario where sensing nodes are powered by energy harvested from the environment. We assume that in each slot the utility generated by the sensors is a function of the number of the active sensing nodes in that slot. Assuming the energy harvesting processes at individual sensors are independent Bernoulli processes, our objective is to develop a sensing scheduling policy so that the expected long-term average utility generated by the sensors is maximized. Under the concavity assumption of the utility function, we show that a myopic policy, which aims to select a fixed number of sensors with the highest energy levels to perform the sensing task in each slot, is optimal.