Lufthansa chief executive Carsten Spohr spoke of such checks in an interview with the daily Frankfurter Allgemeine Zeitung (FAZ). They could be like sports doping tests, the paper said.
A Germanwings co-pilot deliberately crashed a plane in the Alps in March.
It remains unclear why he did so.
Andreas Lubitz, 27, is thought to have suffered some sort of mental breakdown. Prosecutors in Duesseldorf found evidence of "an existing illness and appropriate medical treatment". They found torn-up sick notes at his home.
Germanwings Flight 4U 9525 - travelling from Barcelona to Duesseldorf - was flown into a mountain by Lubitz, after he locked the plane's pilot out of the cockpit. Germanwings is a budget airline managed by Lufthansa.
In the FAZ interview, Mr Spohr said unannounced medical checks for pilots could be introduced, which in terms of the surprise factor would be similar to doping tests for sports men and women.
He said that in certain cases a doctor might have to be released from the duty of confidentiality, to reveal concerns about a pilot.
Random checks might for example detect a drug that the pilot had concealed from his or her employer.
Since the disaster Lufthansa and other airlines have ruled that there must always be at least two people in the cockpit.
Air accident investigators have staged a test flight to reconstruct conditions on board the Germanwings Airbus A320 which disintegrated on a mountainside in the French Alps after being put into a controlled dive.
The German tabloid Bild says experts flew an identical plane, which took off from Hamburg and returned there after flying in German airspace. It took place on 12 May, a spokesman for Germany's crash investigation authority BFU said.
French investigators say they hope the reconstruction will help them analyse sounds recorded in the cockpit of Flight 4U 9525. The flight copied the various altitudes, speeds, the cockpit door locking mechanism and pilots' breathing noises.
The German airline Lufthansa is considering random medical checks for pilots, to help prevent any future disaster like the Germanwings crash that killed 150 people.