Bruno and Gaga had talked about collaborating for awhile. Per Gaga he called her to come to his studio to hear a song he had written with D'Mile and James Fauntleroy. She arrived around midnight, listened to the song, and loved it. They finished recording it by morning. I assume they worked out the vocal production details together (e.g. harmonies, who would sing what lines, etc) since she has writing and production credit on the song.