It is narrated from Hazrat Anas (may Allah be pleased with him) that when the Prophet (peace and blessings be upon him) would ascend any hill or elevated place, he would say: O Allah! On every height is Your exaltation, and for every praise is Your praise.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12281
Hadith Gradingحکم دارالسلام:إسناده ضعيف لضعف عمارة بن زاذان و زياد بن عبدالله النميري، قلنا : و المحفوظ التكبير كلما صعد شرفا، والتسبيح عند النزول، انظر حديث جابر فى البخاري : 2993