You can see the attacks against you with one hour before the attack and there is no message to announce that you are under attack.
And it's good to attack while players are offline because they can't react, they can't move resources/army, they can't mobilize army or ambush you...