This is an old crappy headboard my wife and I built 13-ish years ago. It was a lot better than the headboard we didn't have at the time. But there were issues with it. It wobbled when you leaned against it. It was kept upright by being bolted directly to the bed frame, but not a very solid feeling headboard. The other problem was we only have 2 pillows, and to lean against it to read or watch TV in comfort, one person would need both pillows. We wanted a sloped and padded headboard, but never could find just what we wanted at any furniture store.
I had some 2 X 6s on hand, so I figured I'd turn those into braces or brackets, but I didn't know what dimensions would be needed, so I just used some blue tape on the floor and just messed around with it until I got what I felt was the right size.