Have you got a pic by any chance?
I bought this 10yrs ago and is the best rail ever. Has been well used and is still being used 3 children later. Think I bought it at Kmart or maybe a baby store. Travels with us everywhere.

You can see where the mattress sits and it is pushed down to lock onto the mattress about 10cm in from the edge.

Fits all sizes of mattresses and it's feet go underneath.
This is the new cheap version bought at Target/Kmart. Is just L-shaped and not very secure. Wouldn't trust it with a thin mattress or a baby. I have the cot wedged against it to stop it moving. It has a gap.

Hope that helps. I will use it on our dining table bed conversion to enclose the edge like a cot. It would work the same on a bed end.