Use this phrase to express a high level of skill or expertise in an activity. She can solve complex math problems in her sleep—she's a real expert.
Pro Tip 2/3
Colloquial Use
It's informal slang, suitable for casual conversations rather than formal or professional settings. Don't worry about the test; you've studied so much, you could do it in your sleep.
Pro Tip 3/3
Hyperbole
This phrase is an exaggeration, not to be taken literally—it's just a way of emphasizing proficiency. I've made this recipe so many times I could do it in my sleep.