I can understand you being wary of having such coughing fits in public @outlander. I am like that when not feeling well. I tend to like being close to home then.
Sounds like you may have gastric reflux. This can causing breathing difficulties and coughing. Your GP may order tests to be sure and/or be able to work it out from the symptoms. So many things can cause heartburn from ulcers, diet, meds to stress etc. That's the confusing frustrating part at times. Your GP should be able to prescribe something to settle it down so you can sleep better for the time being.
Sleeping upright is very uncomfortable. I got use to it when I had to but as soon as I was healed went straight back to sleeping on my side again. Early morning walks on the beach are the best - just wish I could sleep early enough to get up early to do it. I will have to start forcing myself up to get the old body clock back in order. I am usually up at 9:00am. But ideally would love to be up at 6:30am, asleep by 11:00. Doesn't look like either of us will get an early night this evening - or should I say this morning 