Situations from the Jolla Shop is the software exactly for this kind of “if whatever then something” rules.
You could add a custom rule to switch network on/off.
In your case, you’d first turn on the “face down” gesture in the regular settings of Sailfish: this will disable alerts (forgot if its done by do-not-disturb mode, or just setting the volume to 0).
Then add an extra rule in Situations: if alerts are disabled, then activate airplane.
The only draw back is that Situations is currently proprietary.