In the Bible lands people would go up onto their flat housetops to pray in order to be close to God. News was also passed from house to house by people from their housetops. "Shout it from the housetops" is a saying that has its roots in this practice.
While the people in the house were preparing food, Peter received revelation from God. The phrase "fell into a trance" is a very misunderstood one. When we think of someone falling into a trance we think of losing control and being unaware of what is happening. Peter was wide awake, in complete control, and very aware. God was showing him a vision - a picture that was to help him understand that which was about to happen.
God showed Peter birds, animals, and creeping things that the law of Moses indicated were not to be eaten by the children of Israel. Then God told Peter to kill and eat them. Peter responded that he had NEVER eaten anything common or unclean. Even though Christ had fulfilled the law, and this was many years after the day of Pentecost, Peter and the other Judean believers were still practicing the law of Moses. When Peter responded to God that according to the law it was wrong for him to eat these things, God told him that He [GOD] had cleansed these animals. God showed him this vision 3 times! God was preparing his heart to understand a revolutionary idea - the mystery of the one body of Christ in which Judeans and Gentiles have been given all that is available by grace without having to keep the law of the Old Testament.
Verse 17 confirms that this was a vision - a picture from God and not a "trance" as the word is used today. The timing of God is perfect. God showed Peter the picture. Immediately afterward as Peter was considering the meaning of the vision, the men from Cornelius arrived. The three men from Cornelius explained how God had told Cornelius to send for Peter.
God spoke to Cornelius and had him send for Peter. God showed Peter the vision. Then the men arrived and God told Peter to go with them and doubt nothing for He [God] had sent them. Look at all that God did to prepare Peter's heart to minister His Word! After all this Peter knew something BIG was about to happen. In order to verify all that was to happen Peter took six Judean believers with him when they departed the next day. He knew that speaking the Word to Gentiles was a violation of the law of Moses and that the believers in Jerusalem would question him about it. Therefore he took six Judean witnesses with him. (The record in Chapter 11 tells us there were six of them.)