Nonprescription medications Other over-the-counter sleep medications, such as Unisom SleepTabs, contain 25 mg per pill of an antihistamine called doxylamine succinate. These medications work by blocking certain brain chemicals, which can have a sedating effect. They are generally safe but come with some risks.