Complex sentence: They spend a night sleeping on rocks in the mountains and climbing high ridges, and when they see the sea, they begin trekking toward it.
Split into simpler sentences: They spend a night sleeping on rocks in the mountains. After climbing high ridges, they see the sea and begin trekking toward it.