I don't have any pictures but I had a similar situation and I had it repaired around rally time last year. The factory service guy removed the staples where needed and used screws. He may have used some additional 2x2s too. Can't remember.
You'll need to remove your mattress and remove the plywood deck at the head of the bed frame to expose the framing in order to come up with a plan to repair it. I think once you see how it's put together and where it's pulling apart, it will inform a plan of attack.