You can just re-attach it. Sometimes when you flex the stock lines aren't long enough when your lifted and they become disconnected. You can put a hose clamp (25 cents each) from the hardware store around both the front and rear breather tubes to help keep them attached when wheeling.
If yours came off while you were wheeling then you should probably check your diff fluid. If debris or water/mud gets in there that can cause big problems. Depending on how many miles are on your jeep, it may just be time to change the diff fluid anyway. If you drove through water/mud and it was disconnected, definitely time to change and clean the fluid.
Also, you can buy extension lines "tubes" that are longer than the stock ones so that it can stretch as much as needed for the future. I had a 2.5 lift and mine were just about at there limit when flexing while the sways were connected. They definitely would have come off if I'd disco'd .
98 XJ 02 TJ 10 JK 13 JK
2013 JK - Lifted w/ 35s - Bilstein 5100s - Monster TB - Chopped Flares - Can't Keep It Clean
its not from off roading, its my everyday driver and its been a while since i took it on trails, it must have just shaken out. my fluid is not old and its royal purple, ill check it today just make sure im topped off. its just wierd,,,,