All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallahu ‘alayhi wa sallam, is His slave and Messenger.
This hadeeth is false and cannot be attributed to the Prophet, sallallahu ‘alayhi wa sallam. It was reported by Ibn ‘Adiyy in his book Al-Kaamil fi Dhu‘faa' Arl-Rijaal as part of the biography of Yahya ibn Ayyoob Al-Ghaafiqi. It was narrated by Yahya ibn Ayyoob Al-Ghaafiqi from Ibn Jurayj, from ‘Ataa' ibn Abi Rabaah, from Ibn ‘Abbaas, may Allah be pleased with him, that the Prophet, sallallahu ‘alayhi wa sallam, said, "The effeminates are the offspring of the Jinn." People asked Ibn ‘Abbaas, "O Abu Al-Fadhl! How so?" He replied, "Allah and His Messenger forbade a man to copulate with his wife while she is menstruating. If he does, Satan copulates with her first and impregnates her, and then she bears an effeminate."
Ibn ‘Adiyy said, "It is unknown ... I do not know of another chain of narration for this report except from the nephew of Ibn Wahb, from his paternal uncle, from Yahya ibn Ayyoob."
Al-Haafith Ibn Al-Qattaan Al-Faasi cited it in his book Ihkaam An-Nathar fi Ahkaam An-Nathar with the chain of narration cited by Ibn ‘Adiyy and said, "A Munkar (denounced) hadeeth... Ibn ‘Abd Ar-Rahmaan ibn Wahb and Yahya ibn Ayyoob are weak narrators but not to the extent of being accused of fabrication."
Ash-Shibli cited it in his book Aakaam Al-Murjaan with a different chain of narration cited by At-Tartoosi in his book Tahreem Al-Fawaahish, from Ibn Wahb's nephew, as a Mawqoof report (i.e. stopped at the level of the Companion, not attributed directly to the Prophet ).
Allah know best.