They usually take about 20-30 min to kick in so at least that long before bed. Some make you drowsy (esp day night ones) so maybe take them and then head to bed when the drowsiness starts?

HTH and hope you feel better soon.

MG