While Trump has been seeking China's help to press North Korea, the U.S. military has, nevertheless, been asserting its "freedom of navigation" rights in the South China Sea, at the risk of angering China.
Asked about the flight by the two U.S. bombers, Chinese Foreign Ministry spokesman Geng Shuang said there was no problem with freedom of navigation or overflight for the East and South China Seas.
"But China resolutely opposes individual countries using the banner of freedom of navigation and overflight to flaunt military force and harm China's sovereignty and security," he said.
China's Defense Ministry, in a short statement sent to Reuters, said China always maintained its vigilance and "effectively monitors relevant countries' military activities next to China".
"The Chinese military will resolutely safeguard national sovereignty and security as well as regional peace and stability," it added, without elaborating.
The United States has criticized China's build-up of military facilities on South China Sea reefs and tiny islands it has constructed, concerned that they could be used to extend its strategic reach.
Brunei, Malaysia, the Philippines, Vietnam and Taiwan also have claims in the sea, through which about $5 trillion in ship-borne trade passes each year.
The two Lancers that made the flight had earlier trained with Japanese jet fighters in the neighboring East China Sea, the first time the two forces had conducted joint night-time drills.
Two U.S. Lancers flew from Guam over the South China Sea last month, while a U.S. warship carried out a maneuvering drill within 12 nautical miles of one of China's artificial islands in the waterway in late May.