The same question could be asked about Jesus eating, sleeping, crying and hurting. Jesus was fully God when He dwelt on earth. But, He was also fully man. One of His main purposes was to teach mankind how to live a godly life. The best way for Him to do that was to become one of us and to model a godly life for us to emulate.
He depended on His Father, longed for Him and sought His will each and every day. We are called to do the same things. Jesus not only was a man, but He took on the punishment for man’s sin. We see in His anguished cry from the cross that the greatest suffering He felt while paying for our sins was the separation He felt from God the Father. He cried, “My God, my God, why have you forsaken me?” when He realized how sin separated Him from His Father.
You should follow the model of Christ by turning to the Lord in prayer over all things.