When taking an allergy medication that sedates you before bed, does it affect your sleep?

Yes. Yes antihistamines are often sedating and can help you fall asleep.The part of sleep that is restorative is called REM sleep .Unfortunately anti histamines ,do not improve the quality of sleep or the restorative portion of sleep.