Hazrat Abu Musa, Allah be pleased with him, narrates:
“Once while we were on a journey with the Holy Prophet Muhammad, peace and blessings of Allah be upon him, people started exclaiming rather loudly, ‘Allahu Akbar!’ (God is the Greatest). The Holy Prophet Muhammadsa said:
‘O people! Adopt a course of moderation. You are not addressing one who is deaf or absent. You are addressing The One Who is All Hearing, Ever Present and is already with you.’” (Sahih Muslim)