When the deep muscles (Intrinsic Muscles) that support the back become weak the large muscles that move your back take over. So when you try to get up without the muscle support that joint are under pressure causing the stiffness. Once the big muscles activate the stiffness goes away until you sit again.
If you experience stiffness when raising out of a seated position it is a sign of a bigger problem that needs to be addressed through small muscle activation exercises and spinal alignment. Remember take care of the little problems to avoid the bigger problems. Don’t ignore your back!!