"I have an email address that I email that actually changes every week," Sheeran told ET at KIIS-FM's recent 2017 iHeartRadio Jingle Ball. "She's very good at [hiding]. It's kind of like what I aspire to be, I think."
"So I emailed that and then we got on the phone, and it's been in the works since May," he said.
Beyoncé, who had welcomed twins the following month, has not commented on her alleged covert email operations.
"Perfect" was released on Thursday night and is about Sheeran's girlfriend of almost three years and former high school pal Cherry Seaborn.
"I did it and the song came out so long ago," he told Ellen DeGeneres in an interview posted on Friday. "And I was like, 'I want to do it as a single,' and then I thought of a way of relaunching it and I was like, 'Oh, I love Beyoncé. Shall I ask Beyoncé? And in my head, I was like, 'She's gonna say no.' And then I was like, 'Well, you might as well ask.' And she said, 'Yeah,' so here we are."