Friedrich Nietzsche said this quote

We do not belong to those who have ideas only among books, when stimulated by books. It is our habit to think outdoors - walking, leaping, climbing, dancing, preferably on lonely mountains or near the sea where even the trails become thoughtful.