There was a time when flying was not possible for Humans. Anyone trying to visualise something big was called ‘to be in the clouds’, this might be the origin of the idiom. YOU ARE THINKING ABOVE YOUR LIMITS. This was the first thing they heard.
Now that aeroplanes and other aeronautic things can make us fly, it seems too common. So thinking big is not anti-social now, you can think but do not over-do it, else you can be called “to be on cloud-cuckoo land”, you are walking on a lank of clouds. A totally unrealistic space where the land is even virtual.
A space where nothing is real, the land seems to end not much far, the roof is somewhat like the Sky but some more clouds.