All Sirius was aware of was that he was hit by a spell cast by his deranged cousin Bellatrix at the Battle of the Department of Mysteries. That's all he remembers. He also remembered that Harry saw that and then his godson jumped in front of him to try to protect him. This made Sirius think that maybe Harry saved his life but he also knew that Remus was there as well because he had somewhat seen Remus wrap his arms around Harry after Sirius was knocked through the Veil in an effort to keep Harry from following him through it. So this made him think that Remus saved his life. It had to be either Remus or Harry who had rescued him. One of them rescued him. He was certain about that. He was certain it could have been Remus because since October 31,1981 after James and Lily Potter's deaths, Sirius was the only person Remus considered a friend. He was certain it could have been Harry because Sirius was the only family he had left since the deaths of James and Lily Potter on October 31,1981. And this would give Sirius a chance to fulfill James and Lily Potter's wills that were created around the time that Harry was born. And they stated that he was going to be Harry's guardian in the event that something happened to James and Lily Potter and they're not able to take care of Harry.