In all honesty, when Derek had come out of the shower to find Emily gone. He had been relieved, but he had also been a bit disappointed. He had been hoping to just resolve the issue then and there. But with her absence, Derek'd had time to think.
And during his thinking time, he had come up with a solution. The latest cause of friction in the sleeping arrangement between himself and Emily was Derek's own body. So it made sense that in order to solve the problem. All that he had to do was get himself under control. And so Derek, in what was most probably a first among men, spent hours online doing research on erections.
But unlike countless other men who were normally having problems down there and spent hours upon hours researching ways in which to deal with their erectile dysfunction. Derek was going the opposite route. He was looking for ways to stop himself from having a boner in Emily's presence once had been enough.