You have 400bb in front of you and it is 5am - perfect time to undo hours of good grinding
I'd be looking to leave the table and get some sleep ASAP. Id also be concerned with the possibly tilted LAG to my left wanting to do what LAGs do and try to push me out of some pots. In these situations I like to just shut down and avoid building big pots vs the IP LAG. If I weren't leaving soon I'd look to switch seats.
With JJ in this particular situation I'd do one of 2 things:
1) Raise the limper a significant amount - enough to put the LAG off making a move against me. If LAG 3bets pre I fold. If LAG calls pre and plays back postflop I'd be very cautious with only a pair of Jacks since I announced to the LAG I have a big pair or AK preflop.
2) Limp behind limper and only get heavily involved in the hand if I flop a set. If it gets raised big behind me i will call to setmine with good implied odds. Raised and reraised behind and I'm gone.
I know this sounds timid but I've lost so many pots to IP LAGs I just shudder at the thought of risking 300bb at 5am!