I) Here we will work in the Heisenberg picture with time-dependent self-adjoint operators $\hat{Q}(t)$ and $\hat{P}(t)$ that satisfy the canonical equal-time commutation relation
$$ [\hat{Q}(t),\hat{P}(t)]~=~ i\hbar~{\bf 1}, \tag{1}$$
and two complete sets of instantaneous eigenstates$^1$ $\mid q,t \rangle $ and $\mid p,t \rangle $, which satisfy
$$\begin{align} \hat{Q}(t)\mid q,t \rangle ~=~&q\mid q,t \rangle, \cr
\hat{P}(t)\mid p,t \rangle ~=~&p\mid p,t \rangle ,\end{align}\tag{2} $$
$$ \begin{align}\langle q,t \mid q^{\prime},t \rangle~=~&\delta(q-q^{\prime}), \cr
\langle p,t \mid p^{\prime},t \rangle~=~&\delta(p-p^{\prime}),\end{align}\tag{3}$$
$$\begin{align}\int_{\mathbb{R}} \!dq~ \mid q,t \rangle\langle q,t \mid~=~&{\bf 1}, \cr
\int_{\mathbb{R}} \!dp~ \mid p,t \rangle\langle p,t \mid~=~&{\bf 1},\end{align} \tag{4}$$
II) We would like to give an argument$^2$ that the sought-for overlap is of the form
$$ \langle p,t \mid q,t \rangle~=~\frac{f(q,t)g(p,t)}{\sqrt{2\pi\hbar}}\exp\left(\frac{pq}{i\hbar}\right), \tag{5}$$
where $f$ and $g$ are two phase factors $|f|=|g|=1$.
In other words, we can define new instantaneous eigenstates
$$\begin{align} \mid q,t )~:=~&\frac{1}{f(q,t)} \mid q,t \rangle \cr\text{and}& \cr \mid p,t )~:=~&g(p,t) \mid p,t \rangle , \end{align}\tag{6}$$
such that the overlap takes a standard form
$$ ( p,t \mid q,t )~=~\frac{1}{\sqrt{2\pi\hbar}}\exp\left(\frac{pq}{i\hbar}\right). \tag{7}$$
The square roots in eqs. (5) and (7) are due to standard normalization factors in Fourier analysis.
III) Sketched proof: Since everything here will refer the same instant $t$, let us not write $t$ explicitly from now on. Define for convenience an anti-selfadjoint operator
$$ \hat{D}~:=~\frac{\hat{P}}{i\hbar}, \tag{8}$$
so that eq. (1) becomes
$$ [\hat{Q},\hat{D}]~=~ {\bf 1} , \tag{9} $$
or
$$ [\hat{Q},e^{a\hat{D}}]~=~ae^{a\hat{D}} , \tag{10} $$
where $a$ is a real number. It follows from (10) that the state $e^{a\hat{D}}\mid q \rangle $ must be proportional to $\mid q+a \rangle$, i.e. there exists a function $f(q,q+a)$ of two arguments such that
$$ e^{a\hat{D}}\mid q \rangle ~=~f(q,q+a)\mid q+a \rangle.\tag{11}$$
Since $e^{a\hat{D}}$ is an unitary operator, the function $f(q,q+a)$ must be a phase factor $|f(q,q+a)|=1$. Or one can use that
$$\begin{align}\delta(q-q^{\prime})~\stackrel{(3)}{=}~&
\langle q \mid e^{-a\hat{D}}e^{a\hat{D}}\mid q^{\prime} \rangle \cr
~\stackrel{(11)}{=}~&\overline{f(q,q+a)}f(q^{\prime},q^{\prime}+a)
\langle q+a \mid q^{\prime}+a \rangle \cr ~\stackrel{(3)}{=}~& |f(q,q+a)|^2\delta(q-q^{\prime}). \end{align}\tag{12}$$
From the fact that
$$ e^{a\hat{D}} e^{b\hat{D}}~=~ e^{(a+b)\hat{D}},\tag{13}$$
we deduce from repeated use of eq. (11) that
$$ f(q,q+b)f(q+b,q+a+b)~=~f(q,q+a+b). \tag{14}$$
Setting $q=0$ in eq. (14) yields
$$\begin{align} f(b,a+b)~=~&\frac{f(0,a+b)}{f(0,b)} \cr \Updownarrow~& \cr
f(q,q+a)~=~&\frac{f(0,q+a)}{f(0,q)}. \end{align}\tag{15}$$
Hence let us define
$$ \mid q ) ~:=~f(0,q) \mid q \rangle , \tag{16}$$
so that eq. (11) becomes
$$ e^{a\hat{D}}\mid q ) ~\stackrel{(11,15,16)}{=}~\mid q+a ).\tag{17}$$
In other words, we may identify$^3$ the operator $\hat{D}$ with the differentiation operator $\frac{\partial}{\partial q}$.
$$\begin{align} \exp\left(\frac{ap}{i\hbar}\right)\langle p \mid q)
~\stackrel{(8)}{=}~& \langle p \mid e^{a\hat{D}}\mid q )\cr
~\stackrel{(17)}{=}~& \langle p \mid q+a ),\end{align}\tag{18}$$
or in the limit $a\to 0$,
$$\begin{align} \frac{p}{i\hbar}\langle p \mid q)
~=~& \langle p \mid \hat{D}\mid q )\cr
~=~& \langle p \mid \frac{\partial}{\partial q} \mid q )\cr
~=~&\frac{\partial}{\partial q} \langle p \mid q ).\end{align}\tag{19}$$
From the ODE (19) in $q$, we deduce that
$$ \langle p \mid q) ~=~g(p)\exp\left(\frac{pq}{i\hbar}\right), \tag{20}$$
where $g(p)$ is an integration constant that can depend on the parameter $p$. It is not hard to see that
$$ |g(p)|~=~\frac{1}{\sqrt{2\pi\hbar}}.\tag{21}$$
Use e.g. that
$$\begin{align} \delta(p-p^{\prime})~\stackrel{(3,4)}{=}~&
\int_{\mathbb{R}} \!dq~ \langle p \mid q)(q \mid p^{\prime} \rangle\cr
~\stackrel{(20)}{=}~&\overline{g(p)}g(p^{\prime})
\int_{\mathbb{R}} \!dq~\exp\left(\frac{(p-p^{\prime})q}{i\hbar}\right)\cr
~=~~&2\pi\hbar|g(p)|^2\delta(p-p^{\prime}). \end{align}\tag{22}$$
--
$^1$ Instantaneous eigenstates are often introduced in textbooks of quantum mechanics to derive the path-integral formalism from the operator formalism in the simplest cases, see e.g. J.J. Sakurai, Modern Quantum Mechanics, Section 2.5. Note that the instantaneous eigenstates $\mid q,t \rangle $ and $\mid p,t \rangle $ are time-independent states (as they should be in the Heisenberg picture).
$^2$ Here we will only work at the physical level of rigor, ignoring various mathematical subtleties connected with unbounded operators. Also we ignore any topological aspects of the canonical phase space, such as, e.g., if the position $q$ would be a periodic variable.
$^3$ Note that the $q$-representation of the momentum operator $\hat{P}=i\hbar\frac{\partial}{\partial q}$ on kets has the opposite sign of what it has on bras and wavefunctions, cf. e.g. my Phys.SE answer here.