This expression, likely alluding to your notion of pie as some thing sweet and attractive, and sky as from the air, outside of a person’s access, was popularized inside of a World War I music typically attributed to Joe Hill (1927): Hallucination – A vivid perception during the absence https://www.youtube.com/watch?v=snr3is5MTiU