I remember that from when I was really young. I don't know if it helped the cough, but it sure did let me sleep through it.
I've had it twice in 5 years due to my work. The funny part is doctors are reluctant to test you for it because it requires a specialized test, and if you are positive, they have to alert the local CDC. Normally, they'll just throw you a Z pack and tell you to get out. But until you get that Z pack, you'll take ANYTHING to make your muscles stop spasming.