It is narrated from Hazrat Anas (may Allah be pleased with him) that when the Prophet (peace and blessings be upon him) would ascend a hill or a high place, he would say: O Allah! On every height is Your greatness, and for every praise is Your praise.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 13504
Hadith Gradingحکم دارالسلام:إسناده ضعيف لضعف عمارة بن زاذان وزياد النميري