Cconstipation for too long

Hey ladies!!! Soo ive had constipation for like 3 weeks now, first weeks i had like cramps and bloating but now i just have those on the mornings as soon as i wake up... what can it be? Is it because i stoped working out and eating not so healthy???