Nicotine gums substitute for the nicotine in cigarettes, to reduce the nicotine addiction desire to smoke. If used properly at the recommended dosage, with gradual tapering and for the recommended time frame, the gum is not addictive. However if used in higher than recommended doses for long periods of time, you will become and remain addicted to the nicotine just as happens with cigarettes and, to a significant degree defeat the purpose of the gum. Your note suggests that you are committed to quitting. That commitment will go a long way towards your smoking cessation being successful and permanent.
Your sleep disturbance is probably a nicotine withdrawal effect. Assuming that you smoked less than 2 packs daily, you are unlikely to have sustained permanent lung damage and extremely unlikely to get smoke-induced lung cancer. Your risk of this will progressively diminish with time and will be approximately the same as that of your peers who have not smoked, 3 years or so after your quitting. The fact that your cough ceased immediately is a good sign; a sign that the smoking has not resulted in enough inflammation to cause excessive mucus production and lung clearance of mucus.
As the American Lung Association says that by quitting, “You have just committed a death-defying act.” Good luck at sticking with it.