I could probably give a better answer if you gave a reference to a text (though it may not be all that clear in Epicurus' writing style if memory serves), but generically the need for food and the need for sex are pretty different.
The words "natural" and "necessary" can have several very different meanings. I take "natural" in the context of Epicurus to mean that which we have without any external imposition, i.e. things he things humans just have.
For "necessary" in this context, I take it to mean that without this thing an individual person (n.b., the inclusion of the term individual here) will not be able to live. In other words, that which is necessary here is that without which I will die.
I then take the two following sentences to be true:
If I were to not eat, I will die.
If I were to not have sex, I will not die.
Translating them into the terms of necessity:
Eating is necessary.
Sex is not necessary.
I want to eat.
I want to have sex.
become = I have desires for eating and sex. (and we can also adduce for most humans these are natural desires).
Thus, eating is "natural" and "necessary" but sex is "natural" but "unnecessary".
For the record, I don't think he's wrong.