I was under the impression that we sent warning telling them what we were going to do, not to mention we were flying over their airspace to do it.
How did they not have their air force on high alert?
Regarding the leaflets, there were not specific warning leaflets dropped on Hiroshima or Nagasaki prior to the attacks; see a previous answer from atomic authority /u/restricteddata for more details.
More generally, by the time of the atomic bomb attacks Japanese air defences were negligible. USAAF B-29s started bombing Japan in 1944, from China in July and the Mariana Islands in November, and were difficult targets for Japanese defences from the outset, heavily armed and flying at high altitude at the extremes of range for most anti-aircraft guns. Similar to the strategy employed against Germany the Japanese aircraft industry was a priority target and though early raids were opposed and not always accurate or successful they did force the dispersal of aircraft production, attrition steadily wearing down the Japanese air forces. The capture of Iwo Jim in March 1945 allowed long range fighters to escort the B-29s, but this soon proved unnecessary: "… by late spring and summer Japanese air strength in the home islands deteriorated so rapidly that bomber formations again went out unescorted" (The Army Air Forces in World War II: Volume V).
Before the atomic bomb missions, then, Japanese air defences were severely weakened, with aircraft being conserved to use against an invasion: "After June 26, Japanese fighters were rarely encountered in numbers (…) The JAAF was virtually powerless to react against the invaders, and it was told to keep its remaining aircraft in reserve for the final battle, expected in the autumn. Japan's industrial power had been weakened, and the means to defend its airspace was lacking." (B-29 Hunters of the JAAF, Takaki & Sakaida).
The unit formed to drop the atomic weapons, the 509th Composite Group, starting flying practice missions in July 1945 to gather data and experience using "pumpkin" bombs that simulated the size and weight of the Fat Man atomic bomb. From July 20th there were 18 bombing sorties against targets including Koriyama, Fukushima, Nagoka, and Toyama, during which there were no losses, only one B-29 suffering minor damage. An additional benefit of the sorties (together with other reconnaissance and data gathering missions flown by individual B-29s and F-13As) was that small groups of B-29s were not sufficiently unusual to provoke a response from what was left of the Japanese air defences, had they been capable of such.