As this is an UA ticket booked with UA miles, it has little to do with LH allowing a layover. You should get better answers in the UA MP forum, but I'll give it a try.
Do you have a round trip ticket from UA, or two one ways?
You're entitled to a stopover on a round trip award, which you might utilize in Berlin (or London). Unless you hold some premier status, you'd be charged for changes though, which might be more then a cheap LON-BER flights.
You can't do a stopover (layover over 24h) on a one-way award though, so you'd need those 30k miles (which is 2x 15k - what UA charges for European on way flights). In that case, its very much possible to get better value buy purchasing a revenue ticket, especially in advance.