There are many different conditions that can cause excessive sweating, but the most common are various chronic infections or inflammatory conditions as well as certain cancers or metabolic conditions. There is no single scan that can rule out all cancers nor any single blood test that can rule out all infections. Without knowing the specific tests that were done, it is difficult to say what should be done next.
However, there are some conditions that it does not sound like have been yet excluded. It would be appropriate to look for chronic lung diseases, particularly those that can have an associated infections, such as bronchiectasis or tuberculosis. Lying down changes the functional dynamics of the lungs, and many people notice a worseing of symptoms when lying down. Certain heart problems also is commonly worse when lying down, although there usually would be other symptoms present beyond sweating.
It is also true that acid reflux can be worse when lying down, but this usually would not cause sweating.
It is difficult to say what additional tests could be done without knowing the specific tests that have been done. A bone marrow test may be appropriate, which can look for certain cancers and infections that are not apparent by other tests. If blood tests to measure inflammation, such as a sed rate or C-reactive protein, have not been done, this would be appropriate.
If no cause can be identified with these tests, it also would be appropriate to see specialists in the area of infections and inflammatory diseases.