A sleeping pill should start to make you drowsy within about 30 minutes.
If it doesn't make you drowsy within 30 minutes you might have to take 2 instead of one. Some sleeping pills recommend taking 2 at night depending on the dosage you need.
You should take a sleeping pill right before you get into bed.