Prosecutor Michael Greenhalgh told the court the woman entered the 'advanced stages of labour' while the couple were in bed at around 11.30pm. The defendant had fallen asleep but his girlfriend had not.
Mr Greenhalgh said: 'She was in bed, naked as she normally would be.
'In order to try and relieve the pressure and the pain of the contractions, she got onto all fours because she had been told that was a way of relieving the pain.
'She was in that position when the defendant woke up. He saw her naked on all fours and said 'I feel horny', to which she replied 'are you serious?'.
'The defendant then got behind her and started having sex with her.'
The man denied the allegations.
Following the baby's birth, the woman stayed with her mother because the heating at the couple's property was broken.
When she returned home, she made the rape allegations to her family and police.
The court heard initial texts between the pair after the birth were of affection and excitement because of their child, but that the tone soon changed when she went back home.