Mark 6:31 And he said unto them, Come ye yourselves apart into a desert place, and rest a while: for there were many coming and going, and they had no leisure so much as to eat.
Jesus said this in the context of John the Baptist's execution.
Many of Jesus' closest disciples had first been disciples of John. Jesus was very close to John and held him in the highest esteem. Things were so hectic in their work of preaching and teaching that they had no time to themselves to properly mourn their lost friend and colleague.
John's death must have hit home to Jesus because he knew that eventually a similar but more difficult death would soon come to him. They needed a time to grieve for John and to meditate upon his legacy and example.
I hope you have found this helpful.