(Just giving my opinion) If you're in the state of mortal sin, you've cut yourself off from the friendship of God. Likely, if you're getting martyred for the faith, you know this, and hopefully you get it into your mind to do an act of contrition, and mean it. So if you get killed in your sleep for the faith (like an unconscious act) that would be different than if someone said to renounce your faith or else you'll die. I think you'd be in the presence of mind to be able to do that Act of Contrition. You should be doing that every day, ESPECIALLY if you're in the state of Mortal Sin. You shouldn't ever remain in that state for any length of time. If you do fall, then sincerely tell God you're sorry because you love Him, as soon as you can so as not to get into a situation like this one. You wouldn't be in the presence of mind if you were asleep to do that if you were getting martyred and weren't making a conscious decision one way or the other.