This work considers a system with two energy harvesting (EH) nodes transmitting to a common destination over a random access channel. The amount of harvested energy is assumed to be random and independent over time, but correlated among the nodes possibly with respect to their relative position. A threshold-based transmission policy is developed for the maximization of the expected aggregate network throughput. Assuming that there is no a priori channel state or EH information available to the nodes, the aggregate network throughput is obtained. The optimal thresholds are determined for two practically important special cases: i) at any time only one of the sensors harvests energy due to, for example, physical separation of the nodes; ii) the nodes are spatially close, and at any time, either both nodes or none of them harvests energy.