Sunan Ibn Majah (Ibn Majah 239)

It was narrated that Abu Dharr said:

"I heard the Messenger of Allah say: 'Everyone in the universe, in the heavens and on earth, prays for forgiveness for the scholar, even the fish in the sea."