Yes, you can wear yoga pants. They are also commonly referred to as exercise pants and are often used in the fitness and athletic industry.
Yoga pants are typically made of a synthetic fabric that is soft and comfortable. They are stretchy and offer easy movement when you're hiking.
Wearing yoga pants is a great way to stay comfortable during and after your hike, especially if the temperature changes quickly throughout the day.