This expression, likely alluding towards the notion of pie as some thing sweet and desirable, and sky as within the air, past a person’s reach, was popularized inside a Planet War I tune typically attributed to Joe Hill (1927): This system was regularly applied through the Mannerist and Baroque https://www.youtube.com/watch?v=snr3is5MTiU