It's best to take it right before bedtime. Read your doctor's instructions on the sleeping pill prescription label. The instructions have specific information regarding your medication. Always allow ample time to sleep before you take a sleeping pill.