The sleeping pills could definitely be making her confusion worse. Any mind-altering drug, such as sedatives, antidepressants, or tranquilizers, as well as many over-the-counter drugs, can contribute to sundown syndrome.
I was involved in an interesting study of healthy older adults that looked at some of the effects of Benadryl -- a common anti-allergy medicine available at all pharmacies. Half of the group was given Benadryl, and the other half a look-alike sugar pill. Brain waves were measured in both groups while participants performed memory tests and worked on puzzles. Everyone who took the medication performed less well on all the tests.
Even nonsteroidal anti-inflammatory drugs, such as the pain reliever ibuprofen, can cause confusion in frail older adults, especially those with dementia, and make sundowning worse.
But drugs aren't the only cause of sundown syndrome. Any disease in an older adult -- from a chest infection to a urinary tract infection to diabetes -- can adversely affect thought processes and make confusion worse, so it's important to have your mother's doctor check for underlying disease.