In this paper, two-way relay channels with energy harvesting nodes are considered. In particular, short-term sum-rate maximization problem is solved for half-duplex and full-duplex channels under any relaying strategy. Instantaneous rates achieved with energy constraints are evaluated and compared for different relaying strategies, namely amplify-and-forward, decode-and-forward, compress-and-forward and compute-and-forward. A generalized iterative directional water-filling algorithm is shown to solve the sum-rate maximization problem for an arbitrary jointly concave achievable sum-rate, which is constructed by concavifying the rate achievable by a relaying scheme. Observing that optimal relaying scheme depends on the power vectors, a hybrid strategy switching between relaying schemes is proposed, and numerical results demonstrating the advantage of hybrid strategies in an energy harvesting setting are presented.