Prescription cough syrups often have codeine (a narcotic) and are not meant to be used on a regular basis or longer than a week or two. If you can’t sleep without the medicine, then you should follow up with your health care provider to investigate further as to why you are coughing.