A man who allegedly "made a comment about Muslims" before punching a heavily pregnant stranger in the head 14 times and stomping on her head has been refused bail.

Rana Elasmar, 31, who is 38 weeks pregnant, was sitting in a cafe on Parramatta's Church Street on Wednesday night when Stipe Lozina, 43, allegedly leaned over the table she was sharing with friends and launched a frenzied two-minute attack.

She fell to the ground, where it's alleged Mr Lozina then stomped on her head.

The woman's friends and other patrons of the cafe managed to restrain the man until police arrived and arrested him.