You wouldn't show up to work drunk, so should you show up if you're sleep deprived?
One study suggests that a human's brain has the same mental wherewithal when sleep deprived as with a .1% blood alcohol level (which is legally drunk).
What do they define as "sleep deprivation"? Someone who has slept for just six hours a night for 14 days. People in high stress professions are no stranger to long stretches of overworked, under-rested periods, but for many, six hours is the norm.
To watch the effects of sleep on your brain, and how you can make up for sleep deprivation, this video is a helpful reference.
Next time you're facing a stressful time, try to make getting enough sleep one of your priorities in order to perform better as a legal profession.