Is this a bed bug?
Not a bed bug. It is a bark beetle or a closely related beetle. Being in a bed would be a purely accidental occurrence for a beetle like this. They can be attracted to lights at night, so then end up indoors by accident and then wind up in very odd places.
You are welcome.