It can be assumed, however, that Jesus did not do anything meaninglessly. Therefore, we should pay attention to what he did on this occasion before he walked on the water as well as when he did.
The first detail we are told is that he made the disciples go into the boat. Since he had to make them, it implies that they were reluctant to go. Maybe it was because it was late in the afternoon – one reason he had fed the crowd was because it was too late for them to find food. Disciples must learn that Jesus is not limited by the clock and he often asks them to do things at surprising hours.
I would suggest that there is another reason why Jesus wanted them to leave immediately and that was the notions that the crowd were beginning to have. John, in his Gospel, gives more details about the crowd who imagined that the miracle was evidence that Jesus would be the ruler they wanted (John 6:14-15). The disciples could be influenced by such ideas, so Jesus protected them from those notions. Better to be in a storm at sea than in a wrong discussion on the land.
Jesus also told the disciples that he would dismiss the crowd. Probably they expected that would be their task. After all, they had arranged the way the crowd sat in groups; then they had passed the food to them, and then they had gathered up the crumbs. Surely they could dismiss the crowd. Probably not, because of the crowd’s expectation about Jesus, and because the disciples would be influenced by them. I would suggest that in this decision we see the compassion of Jesus in the sense that he knew that they were not ready to handle this situation. They might have imagined that they were ready, but he knew that they were not. Sometimes there are situations that are too big for us, whether we realise it or not.
After he dismissed the crowd, Jesus took time to engage in prayer in an isolated location. Where did he pray? He ensured he would be in a place where he would not be disturbed. When did he pray? After a busy day. Why did he pray? He loved communion with his Father. We are not told what he prayed about, but we can deduce that he was determined to spend time in prayer before he rejoined the disciples. Maybe he was praying for each of them as they crossed the sea. The striking point is that Jesus was a sinless perfect man, yet he realised the importance of prayer.