Consistency is important when it comes to increasing desirable behaviour.
Sometimes a parent might reward undesirable behaviour and give into children's demands and sometimes they don't.This really encourages the child to continue behaving in an undesirable way because they know that at some point, they're going to have to be rewarded for it; to the child this seems quite random.
Random rewards are very powerful in reinforcing behaviour. For example, think about playing on a slot machine; the person doesn’t know when the machine will pay out and is encouraged to keep putting more money in until it does.
It’s the same with children - they don’t know when they will be rewarded for undesirable behaviour, so they will keep behaving in an undesirable way until the parent does give in and reward their crying, whining or unreasonable demands with attention, a later bedtime or sweets.
Of course, it is very difficult to be consistent all the time, but it is easier to be consistent if we aren’t tired or stressed. Prioritising looking after yourself will help you to be less tired, less stressed and more consistent.