A Navy officer has been assaulted on a train after attending an Anzac Day ceremony, according to police.

The alleged assault took place on a train stopped at Glenfied Station in Sydney's west.

The 24-year-old told police he saw a group of men drinking and harassing other train passengers while he was on his way home from Sydney's Anzac Day memorial service in the city, on Monday afternoon.

After approaching the group and asking them to stop drinking and disturbing other passengers, he said one of the men in the group punched him in the face as he was getting off the train.

The officer was in full uniform, AAP reported.

He suffered a bloody nose but did not need to go to hospital.

Police are now looking for the man involved.

ABC/AAP