They sell these mounting brackets that simply are held between the mattress and box spring and hlod the shotgun horizontally there. It is covered by the blanket and should be more than safe on the side less seen by anyone who may happen into your bedroom.
However, and this goes for the headboard thing too, sometimes beds are used for more than sleeping and tossing-n-turning, like watching exciting TV shows, and you should certainly NOT expect it to stay there under some situations.
Could also hang it from a strong hanger in the closet with a cheap Goodwill* house dress wrapped around it.
*...if I weren't boycotting Goodwill for abandoning Rush Limbaugh in that phoney "we need to give away free contraceptives to undermine religious institutions and pretend we are fighting for women's rights becasue no-one can afford a condom."