Testicle was swollen when woke up it is its normal size now it was firm

This . This is likely a hydrocele, which is a sac of fluid around the testicle that may communicate with the abdominal cavity and fill up with fluid from the abdominal cavity from time to time. However, it is more common for these to enlarge over the course of the day while you are up and about, and then get smaller as you lie recumbent overnight, than the situation you are describing. You should go to your doctor or make an appointment with an urologist to be evalauated.