There’s a gray area on the matter of consent when it comes to partners who are asleep. In a situation like this, where one person is asleep, they can’t really give consent to sex. After all, if someone is drugged or drunk, and you have sex with them, that’s pretty clearly rape. On the other hand, in the context of a relationship maybe it can be OK. For example, if you’ve talked about it, and agreed in general that it’s OK to initiate sex when the other person is asleep, there may not be a problem with it. But everybody always has the right to say “not right now”, which they can’t exactly do if they’re asleep.