Is there anything, other than pills, to prevent someone from sundowning?

Yes, plenty. Pills should not be first line. Re-direction should be - such as having the patient look out of a window to get oriented to day & night, music therapy, activities to keep them occupied (puzzles, drawing, walking, etc), social activities (with family, friends, and staff), minimizing use of catheters and ivs. Basically, help them stay oriented, engaged, and as independent as safely possible.