I did something similar last week. I keep the big A/C unit in the companionway
when docked and on shore power
. I haven't the best seal around the opening but a heavy insert of plexi keeps light coming in.
I used a tarp from Lowes that is waterproof AND silver reflective on the top side. The temperature difference is dramatic. I already have a foredeck shade cover that is fabric
this is a very cost effective solution until my new hardtop and dodger
The tarp had grommets and I had a nice bucket full of longish bungy cords to keep it fast.
Colin came and went while the cockpit
stayed dry and cool once the sun returned.