>can't have sex on it
Im impressed, you found someone willing to even consider it, desu.
>or maybe not
That is an inherently wobbly design, its made for space-saving kids or very ocassional spare use, not wild conjugal nookie romps. Im also assuming, you wouldnt have the tools/skills to make it solid(er) - welding, etc. - basically, its not worth the bother of even trying, Get it to fuck, be the best idea, ask your parents for a new one - and if space is that tight, even a wooden high bed be a stabiler idea, usually. Bolting it to a wall, youd need spacers, etc. if you have a skirting board, and, the chances are, its just gonna unattach itself at the first opportunity, leaving you where you were, plus holes in the wall.
tldr, masturbate less vigorously already.