Your boyfriend may not have been "acting" as if he were asleep, but he may have been at least somewhat aware that you were massaging his penis and went along with your intentions. To many men, not being fully awake but aware enough to enjoy this nighttime surprise would be very enjoyable.
Hi,
It's perfectly normal; they're called nocturnal emissions ('wet dreams'), which are spontaneous orgasms that happen during sleeping. Both men and women can experience them, but it's more noticeable for a man because of the ejaculation that can take place. Wet dreams can happen even if there is no physical contact with another person at the time... Take Care