The expression originated from the Hebrew phrase "azov oti be-ima shcha".
The origin of that Hebrew phrase is probably "azov oti le-ma'an hashem!" which means "Leave me alone, for Christ / heavens sakes!"
From there it went certain changes to "azov oti be-shem elohim" (Leave me alone, in the name of god!). Because the last sentence obviously wishing that person to go away, it evolved into a less crule manner "azov oti be-ima shkca" - "Leave me in your mother".
This expression is useable whenever you don't have the patience for someone or for an idea.
Male: Hey babe! Wanna go for a ride?
Female: Leave me in your mother... I'm drunk.
Female: Hey babe! Wanna go shopping?
Male: Leave me in your mother... There's a game on TV.