AAA works. Making sure the pilot knows he is being shot at is a good way to spoil his aim. Air forces sustained high casualties attacking ground targets, which is one reason the rocket projectile was a popular aircraft munition. It is also the rationale for some British units to shoot back weapons free when attacked by "friendly" aircraft. They probably couldn't shoot them down but would make it hard for the aircraft to hit ground troops. As Rich has pointed out, an air attack can take place so fast that it i too late to react. I suspect any AAA would be on flat beds at the beginning or end of a trains which would give a good view of any aircraft attacking along the rail line. I don't think there was necessarially a set drill for military trains. There may have been different rules for passengers of civilian trains caught in an air raid on the home front.