You did see what Missandei looked like naked, right? That pretty much took care of my suspension of disbelief. Smart casting on the part of the show, in that regard ("she's gotta be beautiful/hot enough to arouse a eunuch...")
A less joking take is that Greyworm formed an emotional attachment to her, more than lust, and their actions was more an expression of that deep, emotional caring that he has for her, more than physical desire. Hence his explanation to her about how he fears (not being able to see her if he should die) for the first time.
Pre-pubescent children, for example, form crushes or strong feelings that are not based on lust, but their emotions and feelings, so attraction doesn't have to be primarily sexual.
The actions in bed were from his desire to please her and express his feelings for her in a way that forms a more intimate, complete bond between them. This is kind of like how in actual marriages where one partner becomes impotent or loses arousal or desire, they still have relations, because it's not just a physical act but one of shared emotional intimacy and vulnerability. Plus being able to please her in that way, since she's not devoid of those feelings, can be satisfying in its own right. That's also pretty ground-breaking and unheard of for the Unsullied, but it at least doesn't defy what we know about human biology and medical science.
ED in Marriage: Keeping Your Sex Life Alive Despite Sexual Dysfunction