I would just let them roll with it, hopefully its a phase, could you put the mattress on the floor so its atleast a little bit comfier?
How old is toddler? I was going to say the same as Kirsty, my daughter did this when she was around 1.5-2 years old, and it was just a phase. What I would say, though, is try not to let her keep messing you about by wanting either mummy or daddy and giving into her commands. My LO is 3 now, and she sleeps great in her own bed. Also if it's taking hours maybe LO isn't tired enough what's you're routine?
We literally just have a mattress on the floor for my son lol that's just what he prefers. My son would do that that too but we just tell him it's moms turn to put you to bed & vise versa & he just has to stick it out. It takes him a little longer with his dad so he puts him to bed a little earlier