I would like to talk about this, in a civilized manner...
I think I know why Jews could not pray in a church, but why would they be able to pray in a mosque, where they pray to a completely different G-d?
I'm skeptical myself about the belief in the same G-d between jews and muslims.
I always told a few muslim debaters that both followers believe in the same deity including christians. Some muslims believe me, some don't.
Why skeptical?.. First, the word g-d is a loose general meaning just as the word allah which means g-d.
There's a story about idols once were inside the kabaa in mecca and one of the idols was named allah. There were 360 of those idols with different names. They were all smashed inside at some point and muslims ended up with allah.
muslims themselves believe it in their scriptures. They always recite this word but never g-d.
In fact, the kabaa rituals done by muslims mirror hinduism quite a lot in their rituals. e.s. circling the cubic stone 7 times that both hindus and muslims do.
the kabaa very likely belongs to the hindus which the muslims won't believe for all eternity.