Furnace + boiler in a closet with top open to the attic
You need to make sure they can get enough makeup air for combustion, so that they don't backdraft, but yes, you can and should cover the top, that is absolutely awful for any sort of energy efficiency.