During the fourth watch of the night Jesus went out to them, walking on the lake. When the disciples saw him walking on the lake, they were terrified. “It’s a ghost,” they said, and cried out in fear.
But Jesus immediately said to them: “Take courage! It is I. Don’t be afraid.”
Jesus went up the mountainside probably around 6 pm or so and prayed until 3am. Meanwhile the disciples, being obedient to Jesus, were on the boat far from land and their progression was hindered because the wind was against them. Sometimes we can be right in the centre of God's will and be in a squall that can scare and thwart our progression in the direction that God wants us to go.
Jesus sees what is going on in our lives and He is interceding to the Father for us. We are in the midst of the battle of doing God's work and because of the storms that we are in, we cannot see the progression we are making or notice Jesus' presence but He is there watching out for us always. This also shows us that sometimes God will let us struggle and wrestle with situations while our faith in Him expands. We need to come to the end of strength in self before we are able to grow our faith in Jesus.
The fourth watch is significant.
The Romans divided the night into four watches, 6pm - 9pm, 9pm - 12am, 12am - 3am, 3am - 6am. These times also have a spiritual meaning as we read that the disciples thought Jesus was a ghost and He reassured them that He was not. Here is a good read on the spiritual aspect of the different watches in prayer.