The couple -- who finalized their divorce in November -- lived in Ritchie's native England over the course of their 8-year marriage.
The UK Evening Standard reports the custody agreement will be made permanent within the next 14 days.
"Everything is going to be resolved in the next couple of weeks," a source close to the negotiations told the newspaper. "Everything is going well. It's pretty amicable at the moment. Things are progressing."
The Standard reports that Rocco and David will likely divide their time between London and New York, but go to school stateside. Ritchie could also watch over his sons while Madonna continues on the newly-announced European leg of her concert tour this summer.
Ritchie is "gutted, but resigned" by the custody ruling, one of his pals told the UK Sun. "Guy will still see his sons all the time. He said, 'It doesn't matter where they live -- they will always have the hearts and souls of Englishmen.'"
Madonna's rep did not return calls for comment to the Standard.