"Lagrangian" subalgebra of cohomology, with respect to Poincare duality?
Let's assume $M$ is connected and $n$-dimensional. A subalgebra of $H(M)$ is Lagrangian if and only if its vector space dimension is one half that of $H(M)$ and $K^n=0$.
If $n=2q+1$ then there are always such subalgebras. One of them has $K^i=H^i(M)$ if $i$ is even and $K^i=0$ if $i$ is odd. Another has $K^i=H^i(M)$ if $i=0$ or $q<i<n$ and $K^i=0$ if $0<i<q+1$ or $i=n$.
If $n=2q$ with $q$ odd, then you can always make an example by choosing $K^q$ to be Lagrangian with respect to the alternating Poincare duality form on $H^q(M)$ and putting $K^i=H^i(M)$ if $i=0$ or $q<i<n$ and $K^i=0$ if $0<i<q$ or $i=n$.
If $n=4k$ then you can do the same thing if the symmetric Poincare duality form on $H^{2k}(M)$ has a "Lagrangian form" (i.e. if the signature of the manifold is zero), but there is no Lagrangian subalgebra if the signature is not zero.
By definition, a closed oriented $n$-dimensional manifold $M$ has a twisted double structure if $M=N\cup_h-N$ for an orientation-preserving self-homeomorphism $h:\partial N \to \partial N$ of the boundary of an oriented $n$-dimensional manifold $N$. The graded subalgebra $K^{\bullet}=ker(H^{\bullet}(M)\to H^{\bullet}(N)) \subset H^{\bullet}(M)$ is a Lagrangian subalgebra of the asymmetric Poincare duality structure on $H^{\bullet}(M)$. In fact, using ${\mathbb Z}[\pi_1(M)]$-coefficients the converse is true: a closed oriented $n$-dimensional manifold $M$ has a twisted double structure if and only if there exists such an asymmetric Lagrangian subalgebra. The obstruction to the existence of a twisted double structure is the Quinn obstruction to the existence of an open book structure on $M$, which takes value in the asymmetric Witt group for $n$ even, and is 0 for $n$ odd. (As usual, one has to treat the cases $n>4$ and $n \leq 4$ separately and be particularly careful with the low-dimensional cases). See Chapters 29 and 30 of my 1998 Springer book "High-dimensional knot theory" http://www.maths.ed.ac.uk/~aar/books/knot.pdf for the algebraic surgery treatment of this obstruction, including the references to the relevant work of Milnor, Smale, Barden, Wall, Winkelnkemper, Quinn and T.Lawson. The book also includes an appendix by Winkelnkemper on the history and applications of open books.