You could have some fluid on your lungs. When you lie down, the fluid spreads out into a shallow pool and covers the maximum amount of alveoli. Then you need to cough so you can breath. A week after valve surgery, this situation is not uncommon.
You can pile a bunch of pillows at the head of your bed, so that you can sleep with your head and chest higher. Or you can sleep in a recliner, if you happen to have one of those. You should also follow up with your surgeon about this. He may want to do a chest x-ray. He also may want you to be doing breathing exercises. In fact, if you still have the spirometer that you were presumably given in the hospital, I would recommend you continue using it until directed otherwise.
If the coughing is getting worse instead of better, it becomes an urgent matter to get medical help. If you develop fever, I would regard that as a medical emergency. But unless the coughing is getting much better day by day, I would call the doctor's office tomorrow.
The Content on this Site is presented in a summary fashion, and is intended to be used for educational and entertainment purposes only. It is not intended to be and should not be interpreted as medical advice or a diagnosis of any health or fitness problem, condition or disease; or a recommendation for a specific test, doctor, care provider, procedure, treatment plan, product, or course of action. Med Help International, Inc. is not a medical or healthcare provider and your use of this Site does not create a doctor / patient relationship. We disclaim all responsibility for the professional qualifications and licensing of, and services provided by, any physician or other health providers posting on or otherwise referred to on this Site and/or any Third Party Site. Never disregard the medical advice of your physician or health professional, or delay in seeking such advice, because of something you read on this Site. We offer this Site AS IS and without any warranties. By using this Site you agree to the following Terms and Conditions. If you think you may have a medical emergency, call your physician or 911 immediately.