Lack of sex with boyfriend is making me irritable

Why do I become cross if my boyfriend and I have not had sex for a few days? I can feel myself becoming irritable, even if I am not feeling particularly in the mood for sex.
I don’t consider myself to have a particularly high libido, but I have noticed that as soon as we have sex, I am much happier.