Mishkat al-Masabih 3186
Abu Sa'id al-Khudri said:
We went out with God’s Messenger on the expedition to the B. al-Mustaliq (an expedition in 6 A.H) and took some Arab women captive, and we desired the women, for we were suffering from the absence of our wives. We liked withdrawing the penis and wanted to do so, but we asked ourselves whether we could do it when God’s Messenger was among us before asking him. So we asked him about that and he replied, “It does not matter if you do not do it, for every soul that is to be born up to the day of resurrection will be born.” 

(Bukhari and Muslim.)
وَعَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ قَالَ: خَرَجْنَا مَعَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ غَزْوَةِ بَنِي الْمُصْطَلِقِ فَأَصَبْنَا سَبْيًا مِنْ سَبْيِ الْعَرَب فاشتهينا النِّسَاء واشتدت عَلَيْنَا الْعُزْبَةُ وَأَحْبَبْنَا الْعَزْلَ فَأَرَدْنَا أَنْ نَعْزِلَ وَقُلْنَا: نَعْزِلُ وَرَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ بَيْنَ أَظْهُرِنَا قَبْلَ أَنْ نَسْأَلَهُ؟ فَسَأَلْنَاهُ عَن ذَلِك فَقَالَ: «مَا عَلَيْكُمْ أَلَّا تَفْعَلُوا مَا مِنْ نَسَمَةٍ كَائِنَةٍ إِلَى يَوْمِ الْقِيَامَةِ إِلَّا وَهِيَ كَائِنَةٌ»