This is a common finding in dogs with severe heart disease as a result of fluid building up in or around the lungs (see Congestive Heart Failure).
Many dogs with severe difficulty breathing will actually refuse to lie down because it is harder for them to breathe in this position, causing them to become distressed.