Credit: Jeff Kravitz/; Jon Kopaloff/FilmMagic

Charlie Sheen's "Sober Valley Lodge" is now absent two residents: Bob and Max, his nearly 2-year-old twins with ex-wife Brooke Mueller.

Sheen, 45, surrendered his sons to cops in his L.A. home late Tuesday, TMZ confirms.

The dramatic handover occurred hours after a judge temporarily stripped Sheen of custody of the twins -- and granted Mueller a restraining order against the combustible star.

In legal documents, Mueller claimed that Sheen (who assaulted her on Christmas Day 2009) threatened her, allegedly saying "I will cut your head off, put it in a box and send it to your mom."

Mueller also charges that Sheen threatened to stab her in the eye with a penknife during a tense Feb. 23 encounter.

The restraining order demands that Sheen must stay 100 yards away from Mueller.

One catch: Mueller is presently in "day treatment" for her own substance abuse problems, her lawyer said in court. She will visit with the boys 4 hours a day, while her mother will care for Bob and Max.

Sheen wrote on his brand-new Twitter account after the incident: "My sons' are fine... My path is now clear... Defeat is not an option..!"