You need enough sleep to function, and so does your child. Sleep deprivation destroys good moods in adults and children. Most adults need 8 solid hours of sleep every night; most children need 8-12. Sleep deprivation can be part of why your child is upset and irritable. Sleep off that irritability and have your child do the same thing. You'll almost always feel better in the morning. While it may not solve all of your problems, you'll be in a better place to start addressing them.