The Midrash says that Moshe asked the same question as Solomon. Hashem replied that He can conform to a size if a square cubit. Both Moshe and Solomon built a house for the Shechina to reside. Shechina implies a neighbor, Hashem desired to reside near us, to allow us to visit with Him, so to speak, in His house whenever we wanted. V’Asu li mikdash v’shachanti b’tocham.
Moshe and Solomon sought a structure that would be a home for prayer. Perhaps that is why we initiate our morning prayers with the phrase V’Ani brov chasdecha avo el baysecha, I will come to Your House and bow down in fear and trepidation before You. I will cast away my personal fears and insecurities that characterize my homelessness. For only in Hashem’s house can both insignificant man and exalted man feel truly at home.