This sort of thing often happens along with developmental leaps: new skills, new vocabulary, growing new teeth, growth spurts, things like that.
Around 3YO, both my kids started sleeping on their floors and not their beds, for months on end. One kid went back to bed when it got cold and she wanted more blankets, the other actually laid out a sleeping bag and slept on her floor for upwards of a year...and then she stopped. Both girls took turns sleeping on our floors partway thru the night so we laid out sleeping bags for them too. As long as they're sleeping and we're not having to wake for them, we were OK with it.
Your mileage may vary.