From your symptoms it could be misaligned bones from previous injury or slip disc. You can wait till tomorrow morning.
When you cough the intra abdominal pressure increases, and the pressure of air expelling can hit on your vertebral bones. If there is an already misaligned bone, the pain aggravates on coughing. You need to visit an orthopaedician to know the region at slip disc. Or even if you are having a vertebral abnormality like scoliosis or kyphosis also this can occur.
An X-ray should of back should be taken to find out region of abnormality and what is the cause. If it is a slip disc then you will have to be wearing a cast or traction band to align it or if it is of higher degree you might need a surgery. If its scoliosis then, just physiotherapy should do to strengthen your back muscles.
Meanwhile till tomorrow morning, take a cough syrup for your cough and Tylenol for pain.