This bedframe seems to have a slot joint system but I can't seem to understand how to take it apart. There are two pegs I think will allow me to slide the side out but I'm not sure how to get the pegs out.
That looks like the board just slides upward. See the slot underneath the board? Lift up on the board with the pegs, and gently tap the board with the slot downward using a hammer or something. The board with the pegs probably has some J hooks that slide into the slot and hook over a peg, dowel, or whatever that crosses through the slot.
Edit: Here's a picture likely resembling what you have that goes into that slot.