You can use newtxsf for the Greek letters and mathastext:
\documentclass{scrartcl}
\usepackage{newtxsf}
\usepackage[sfdefault]{AlegreyaSans}
\usepackage[italic]{mathastext}
\begin{document}
This is in Alegreya Sans, with math
$E=mc^2$ and $\sin(\alpha+\beta)=\pi$
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
\boldmath Also bold math
$E=mc^2$ and $\sin(\alpha+\beta)=\pi$
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
\end{document}

For serif text and sans serif math (but why?), you can use a trick suggested in the manual of mathastext:
\documentclass{scrartcl}
\usepackage{newtxsf}
\usepackage{Alegreya,AlegreyaSans}
\renewcommand\familydefault\sfdefault
\usepackage[italic]{mathastext}
\renewcommand\familydefault\rmdefault
\begin{document}
This is in Alegreya Sans, with math
$E=mc^2$ and $\sin(\alpha+\beta)=\pi$
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
\boldmath Also bold math
$E=mc^2$ and $\sin(\alpha+\beta)=\pi$
\[
\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}
\]
\end{document}

\rmdefaultis not a recognised option with Alegreya. – Ram Iyer Oct 08 '16 at 15:19