Aladdin and co. are captured by mud creatures called the AlMuddi, and they need water in order to beat them, but it's hard to find that in a dessert so they use the next best possible way of beating them. The sun!